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 Paul Giesenhagen QuillDesign 417-885-1375 http://www.quilldesign.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:242158 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