processing is done by the DBMS, but in QoQ, it's done by CF. So whether a
regular query will allow IS NOT NULL or not isn't relevant.
You could try testing the CF version --
<cfif listFirst(server.coldfusion.productVersion) eq 5>
cf5 markup
<cfelse>
cfmx+ markup
</cfif>
_____
From: Mark Henderson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 6 October 2004 5:25 p.m.
To: CF-Talk
Subject: SQl on CF5 Versus CFMX
I'm noticing some oddities I'm not that familiar with. To outline, I test at
home on cfmx but one of our work servers is still running on 5, hence these
results.
Perhaps someone can shed some light on this for me. If I conduct a query of
a query, like so...
<cfquery datasource="#request.dsn#" name="election_contested">
SELECT
contested_ID,mayoralty,src_waikaka,src_gore
FROM
election_contested
</cfquery>
<cfquery dbtype="query" name="election_mayoralty">
SELECT mayoralty
FROM election_contested
WHERE mayoralty IS NOT NULL
</cfquery>
CFMX is fine with this but cf5 throws an operator error and barfs on the "IS
NOT NULL" (but only for a query on a query). I can use "is not null" on a
normal database query in CF5.
Whereas if I try this alternate approach...
<cfquery dbtype="query" name="election_mayoralty">
SELECT mayoralty
FROM election_contested
WHERE mayoralty <> ''
</cfquery>
CF5 is fine with this and CFMX reads it ok but disregards the where command
(or at least, it's ignoring it) and thus displays the empty fields as well.
The only way I know how to make this work across both systems is to remove
the where command from the query completely and in the output use something
like
<h3>District Council Mayoralty</h3>
<cfoutput query="election_mayoralty">
<cfif Len(mayoralty)>
#capFirstTitle(mayoralty)#<br />
</cfif>
</cfoutput>
Has anyone seen this type of thing before, and is it possible for me to use
something in the second query to remove null entries (that works on 5 and
MX)?
TIA
Regards
MarkH
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

