>>I have this query:
>><CFQUERY NAME="getSchemas" DBTYPE="query">
>>SELECT schema, tableType, count (*) AS nbTables
>>FROM getTables
>>GROUP BY schema, tableType
>>ORDER BY schema
>></CFQUERY>
>>It is supposed to count tables by table type and Schema.
>>The getSchemas query itself is ordered by schema, tabletype
I think the problem has to do with the fact that there are some rows having schema empty.
Then it seems that CF is considerig the column schema as a numeric type.
If I add the line WHERE schema <> 'OE' then I get an error that
"Error: OE is not a number"
If the schema column is considered as a number also by the GROUP command, then all rows
are evaluated as 0, and the grouping is purely random.
If I use WHERE tableType <> 'SYSTEM', I get no error, probabily because there are no tableType column empty, and CF is taking is as a string this time. The GROUP on schema still does not work however.
Now, the problem is how can I specify that the columns are type TEXT and not NUMBER in a query of query?
I don't think I can use CFQUERYPARAM here, can I?
--
_______________________________________
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

