Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

When there are no records....(data query driven task)

Status
Not open for further replies.

Chance1234

IS-IT--Management
Jul 25, 2001
7,871
US
I'm trying a data query driven task doobrie, and it works fine - ish but here is my problem

in my transformation code

i have somethign like this

Function Main()
On Error Resume Next

Dim chkC
Dim idexists

chkc = DTSSOURCE("CUST_ID")

idexists = DTSLookups("chkCust").execute(chkC)

IF idexists = "" THEN
DTSDestination("pay_me") = DTSSource("PAY_METHOD")
DTSDestination("terms") = DTSSource("TERMS_ID")
DTSDestination("post") = DTSSource
Main = DTSTransformstat_InsertQuery
End IF

end function


which works getting data over for the first time, but what i want this to do is to look for new records and add in just the new ones, hence the look up. but when there are no new records it comes up as an error, how can i get it to come up succesful ? as i want to continue my workflow regardless ? also is my lookup with the if the right strategy ?

Filmmaker, gentlemen and proffesional drinker



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top