Try this. The fields still exist even when the values are null. You need to
check whether it has a value or not.
--Jeffrey
<cfoutput query= "Report">
<cfif len(trim(Milestone)) GT 0>
<u>Construction</u>: #Milestone#<br>
</cfif>
<cfif Milestone neq ' ' >
<cfif Milestone neq " ">
<cfif Milestone neq 'NULL'>
<cfif Milestone neq NULL>
-----Original Message-----
From: Natasha Regehr [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 07, 2000 12:46 PM
To: Fusebox
Subject: OT: SQL and NULL values
Hi,
I can't figure something out. I don't have a lot of experience with SQL so
maybe you can help. I have a query that pulls records from a database. If a
certain field returns a NULL value I don't want the header displayed,
otherwise display the header. I have tried the following and none have
worked correctly:
Database:
In the database the "Allow Nulls" box is checked. (if that
makes a difference)
Cold Fusion:
<cfoutput query= "Report">
<cfif ParameterExists(Milestone)>
<u>Construction</u>: #Milestone#<br>
</cfif>
<cfif Milestone neq ' ' >
<cfif Milestone neq " ">
<cfif Milestone neq 'NULL'>
<cfif Milestone neq NULL>
With each of the above methods, the header is still displayed
whether there is a value or not.
Please let me know if you ever run into this problem, and any advice
you can give.
Thank you,
Natasha
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists