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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Case syntax for DTS

Status
Not open for further replies.

uncleroydee

Technical User
Nov 28, 2000
79
US
Will someone please send me a basic Case syntax for a DTS ActiveX package? I'm using VB Script and I'm looking for something as simple as
"Case
If DTSSource("source") = 1 then "Yes"
If DTSSource("source") = 0 then "No"
Else "Green"
End"

I guess I'm especially dense this morning.

Thanks.
 
Found I was on wrong track. Should have been using If...Else statement. New wrinkle; I'm now getting error message "Expected 'End'" for the second line of the following statement:
If DTSSource("Lead center") = DSCC THEN DTSDestination("LeadCenter") = 1
ElseIf DTSSource("Lead center") = DSCP THEN DTSDestination("LeadCenter") = 2
ElseIf DTSSource("Lead center") = DSCR THEN DTSDestination("LeadCenter") = 3
Else DTSDestination("LeadCenter") = 0
End If

I thought the ElseIf statements could be "stacked" within the If...Else statement.

Any ideas out there?

Once again, thanks.
 
DTS allows you to use lookup tables, I would suggest using them for code translations like this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top