|
Mailing Lists
|
Home / Groups / ColdFusion Talk (CF-Talk)
SQL Issue with NULLK, 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 >> >> >> >> >> >> > |
June 20, 2013
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||