Brad,

        I can get a CASE statement to work in a query:

        Select ID
        FROM MyTable
        CASE  ID
                WHEN 2 THEN Order 1
                WHEN 3 THEN Order 2
        
        
        but not with a passed param:

        CASE @MyParam
                WHEN 'A' THEN Select ID from MyTable
                WHEN 'B' THEN Select ID from MyTableTwo
                WHEN 'C' THEN Select ID from MyTableThree

Is that possible.  All the examples I can find always have the CASE
statement as part of the query.
>From http://msdn2.microsoft.com/en-us/library/ms181765.aspx :

SELECT FirstName, Lastname, TelephoneNumber, 'When to Contact' = 
     CASE
          WHEN TelephoneSpecialInstructions IS NULL THEN 'Any time'
          ELSE TelephoneSpecialInstructions
     END
FROM Person.vAdditionalContactInfo


Thanks
Rodney

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get involved in the latest ColdFusion discussions, product
development sharing, and articles on the Adobe Labs wiki.
http://labs/adobe.com/wiki/index.php/ColdFusion_8

Archive: http://www.houseoffusion.com/groups/SQL/message.cfm/messageid:2959
Subscription: http://www.houseoffusion.com/groups/SQL/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.6

Reply via email to