House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home / Groups / ColdFusion Talk (CF-Talk)

SQL Issue with NULL

Author:
James Blaha
04/28/2003 01:28 PM

K, Awesome Post! I learned something new on this one, your solution works great. I have a call into MM now to see what the official deal is I'll post the outcome. Regards, James Blaha ksuh@shaw.ca wrote: >This is correct behaviour.  The field has a datatype of datetime, therefore, data in that field will appear as a date time.  What's happening is that sql server is casting the '' to the equivalent datetime value, which is 1900-01-01 00:00:00. > >You could change your query to: > >select isNull(convert(varchar, Response_DT), '') > >>>Good suggestion! I tried your idea out but look at what it did >>>       >>> >>to the >>     >> >>>result set. >>> >>><CFQUERY name="CreateTimedCached" datasource="Agent" > >>> >>>SELECT isNull(Response_DT, '') as Response_DT >>>FROM Apply >>> >>></CFQUERY> >>> >>>This is what my output became when I output the result set? Is this >>>because of the SQL server? Can I set the date-time value to >>>blank when I have a date-time field? >>> >>>1900-01-01 00:00:00 >>>1900-01-01 00:00:00 >>>1900-01-01 00:00:00 >>>1900-01-01 00:00:00 >>>1900-01-01 00:00:00 >>>1900-01-01 00:00:00 >>>2003-04-16 16:19:36 >>>       >>> >>Are you displaying it with DateFormat, or just the field? If it's just >>the field, then it shouldn't give you a date at all >> >>I know that MX has issues with Queries and it's field types, but CF5 >>shouldn't have those problems at all >> >> >> >> >>     >> >


Search cf-talk

June 20, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
             1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30             

Designer, Developer and mobile workflow conference