weaverdm
February 11th, 2005, 09:05 AM
Can someone tell me what is wrong with this code? Are the "ands" not allowed in a CASE select statement? I have used the "ors" before and they work fine.
Function Main()
select CASE DTSDestination("CardType")
CASE (DDTSSource("maestroflag") = "N" or DTSSource("maestroflag") = " ")
AND (DTSSource("atmflag") = "B" or DTSSource("atmflag") = "C" or DTSSource("atmflag") = "E")
DTSDestination("CardType") = "Cirrus Only"
CASE (DTSSource("atmflag") ="N" or DTSSource("atmflag") = " " )
AND(DTSSource("maestroflag") = "B" or DTSSource("maestroflag") = "C" or DTSSource("maestroflag") = "E")
DTSDestination("CardType") = "Maestro Only"
CASE else (DTSSource("atmflag") = "B" or DTSSource("atmflag") = "C" or DTSSource("atmflag") = "E")
AND (DTSSource("maestroflag") = "B" or DTSSource("maestroflag") = "C" or DTSSource("maestroflag") = "E")
DTSDestination("CardType") = "Cirrus & Maestro"
End select
Main = DTSTransformstat_InsertQuery
End Function
Function Main()
select CASE DTSDestination("CardType")
CASE (DDTSSource("maestroflag") = "N" or DTSSource("maestroflag") = " ")
AND (DTSSource("atmflag") = "B" or DTSSource("atmflag") = "C" or DTSSource("atmflag") = "E")
DTSDestination("CardType") = "Cirrus Only"
CASE (DTSSource("atmflag") ="N" or DTSSource("atmflag") = " " )
AND(DTSSource("maestroflag") = "B" or DTSSource("maestroflag") = "C" or DTSSource("maestroflag") = "E")
DTSDestination("CardType") = "Maestro Only"
CASE else (DTSSource("atmflag") = "B" or DTSSource("atmflag") = "C" or DTSSource("atmflag") = "E")
AND (DTSSource("maestroflag") = "B" or DTSSource("maestroflag") = "C" or DTSSource("maestroflag") = "E")
DTSDestination("CardType") = "Cirrus & Maestro"
End select
Main = DTSTransformstat_InsertQuery
End Function