|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
query of query strange error
Hi All-fun and learning 05/22/12 02:44 P Use the optional second argument to QueryNew to explicitly define the data types for each column.Christopher Watson 05/22/12 02:47 P Hi All- I am facing a strange error with query of query as follows: I am first constructing a query using 'QueryNew' as <Cfset newQuery = QueryNew("id, status, label, name")> the status column is a numeric column in database with values of 1,2,3,4,5,6 and NULL When I do a query of query as below, I get an error 'The value '' cannot be converted to a number'. This does not happen always: <cfquery dbtype="query" name="qoq"> select * from newQuery </cfquery> ANy thoughts on why this could be happening? Use the optional second argument to QueryNew to explicitly define the data types for each column. -Christopher ----- Excess quoted text cut - see Original Post for more ----- > select * from newQuery > </cfquery> > > ANy thoughts on why this could be happening? How are you setting the value on the query when the value is null from the database? I think you may need to use javacast("NULL",0) if you keep the column as a numeric type. -Quan ----- Excess quoted text cut - see Original Post for more ----- > select * from newQuery > </cfquery> > > ANy thoughts on why this could be happening?
|
May 24, 2013
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||