Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Using VBS

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-02-06 : 08:15:03
Roy writes "Is it possible to use the VBScript "Select Case" statement as part of a DTS package in SQL Server 7.0? If so, what is the syntax?

I've been successful in using the Left, Mid, and Right functions as follows:
Function Main()
DTSDestination("C_NBR_Agcy") = LEFT(DTSSource("Contract Number"),6)
DTSDestination("C_NBR_YR") = MID(DTSSource("Contract Number"),7,2)
DTSDestination("C_NBR_RFQ_Type") = MID(DTSSource("Contract Number"),9,1)
but have had no success with Select Case (or the "CASE" SQL alternative for that matter.)

I have been able to use SQL "CASE" statements in stored procedures, it's just DTS that's causing me heartburn.

Thanks,"
   

- Advertisement -