Ver Mensaje Individual
  #2 (permalink)  
Antiguo 17/07/2006, 11:42
zaracato
 
Fecha de Ingreso: diciembre-2003
Mensajes: 18
Antigüedad: 20 años, 5 meses
Puntos: 0
por fin encontre la solución, la pongo para que si alguien algún día tiene el mismo problema no batalle tanto como yo :P


Function Main()

Main = DTSTransformStat_InsertQuery
'If (IsEmpty(DTSLookups("Lookup").Execute(DTSSource("C ampo1")))) Then
If NOT (IsEmpty(DTSLookups("Lookup").Execute(DTSSource("C ampo1")))) Then
'Main = DTSTransformStat_InsertQuery
DTSLookups("DEL").Execute(DTSSource("C ampo1")

'Else
'Main = DTSTransformStat_UpdateQuery

End If



DTSDestination("Campo1") = DTSSource("Campo1")
DTSDestination("Campo2") = DTSSource("Campo2")
DTSDestination("Campo3") = DTSSource("Campo3")
DTSDestination("Campo4") = DTSSource("Campo4")
DTSDestination("Campo5") = DTSSource("Campo5")
DTSDestination("Campo6") = DTSSource("Campo6")
DTSDestination("Campo7") = DTSSource("Campo7")


Main = DTSTransformStat_OK

Donde DTSLookups("DEL").Execute(DTSSource("Campo1")
elimina el registro actual, al parecer SQL Server se hace bolas cuando actualiza el campo y al eliminarlo lo inserta sin problemas