I have been getting nowhere with this one, please can anyone help, NPC_Code is the PK in a table called STOCK
I have a Lookup
And Then Trying to use this within the script
The trouble is there IS a duplicate NPC Code and therefore it fails on Unique Contraints !
Help !
I have a Lookup
Code:
SELECT NPC_Code
FROM STOCK
WHERE (NPC_Code = ?)
And Then Trying to use this within the script
Code:
Function Main()
Dim tNPC
tNPC = DTSLookups("luNPC").Execute(DTSSource("NPC_Code").value)
If IsEmpty(tNPC) Then
DTSDestination("NPC_Code") = DTSSource("NPC_Code")
DTSDestination("Annual_Maintenance") = DTSSource("Annual_Maintenance")
Main = DTSTransformStat_OK
Else
Main = DTSTransformStat_SkipRow
End if
End Function
The trouble is there IS a duplicate NPC Code and therefore it fails on Unique Contraints !
Help !