CAST also, cannot convert or change the datatype of certain datatypes to others, there are some limitations to it.
-----Original Message----- From: Jochem van Dieten [mailto:[EMAIL PROTECTED]] Sent: 07 January 2003 13:51 To: CF-Talk Subject: Re: newbie: help with sql query Azeem Huda wrote: > > Syntax error (missing operator) in query expression 'CASE WHEN > bugs.bug_type_id = 0 THEN CAST (0 AS VARCHAR) ELSE bug_type.bug_type'. Sounds like your database does not have support for CASE statements. You need to check the manual for some other type of IF support. > Can you explain "CAST (0 AS VARCHAR)". Btw, at this stage of development i > am using Access2000 but will be changing to SQL2000 soon, so the bug_type > field is simply "text". The normal datatype of 0 is some numberic type. But bug_type is some text type. Since they will be in the same column, their datatype *has* to be the same. CAST() will override the default datatype and cast it to some other datatype so they are the same. But again, I am not sure if your database supports the cast statement. Jochem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

