Thanks folks, that worked perfectly!

Paul Giesenhagen
QuillDesign
417-885-1375
http://www.quilldesign.com


----- Original Message ----- 
From: "Munson, Jacob" <[EMAIL PROTECTED]>
To: "CF-Talk" <cf-talk@houseoffusion.com>
Sent: Friday, June 02, 2006 5:24 PM
Subject: RE: MySQL -> MS SQL


>I usually use case statements, like so:
> speciesFusionID = CASE WHEN sf.speciesFusionID IS NULL THEN 0 ELSE 1 END
>
>
>> -----Original Message-----
>> From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]
>> Sent: Friday, June 02, 2006 4:15 PM
>>
>> I have a MySQL query that works great, but the IF statement I
>> can't get to work in MS SQL ... anyone dare to help out
>>
>> SELECT s.speciesID, s.speciesName,
>>      IF(sf.speciesFusionID IS NULL, "0", "1")
>>      FROM uoaSpecies s
>>      LEFT JOIN uoaSpeciesFusion sf
>>      ON (s.speciesID = sf.speciesID AND sf.coID = #url.coID#)
>>
>> <!---- This is the problem line --->
>> IF(sf.speciesFusionID IS NULL, "0", "1")
>>
>> Basically if speciesFusionID IS NULL then I want
>> speciesFusionID to be 0 if it isn't, I want it to be 1
>
> This transmission may contain information that is privileged, confidential 
> and/or exempt from disclosure under applicable law. If you are not the 
> intended recipient, you are hereby notified that any disclosure, copying, 
> distribution, or use of the information contained herein (including any 
> reliance thereon) is STRICTLY PROHIBITED. If you received this 
> transmission in error, please immediately contact the sender and destroy 
> the material in its entirety, whether in electronic or hard copy format. 
> Thank you. A1.
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:242188
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to