|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#1
|
|||
|
|||
|
Querying empty fields
A pretty simple one I hope....I want to query a table and retrieve all EMPTY records (for the field margin_1 in this case). Here is the major part of the query so far..
------------------------------------------ <cfquery name="clientDetails" datasource="#request.dsn#"> SELECT * FROM client WHERE team_name IN (SELECT team_name FROM round_#round_number# WHERE margin_1 = '1-9' ) </cfquery> ------------------------------------------ ...which works, and outputs all users who selected the margin 1-9 (from a dropdown form box) but when I try and use WHERE margin_1 = '' to select all those who have not entered, it outputs nothing, even though there are several users that fit this criteria. Is there an easy way to select an empty field like this? TIA Mark |
|
#2
|
|||
|
|||
|
Have you tried using the 'null' character? That's just off the top of my head.
|
|
#3
|
|||
|
|||
|
I sure have...and again, when I use
WHERE margin_1 <> null I get results for all who have entered, BUT both.... WHERE margin_1 = null and WHERE margin_1 <> not null output zilch. |
|
#4
|
|||
|
|||
|
Try:
WHERE margin_1 IS NULL |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Querying empty fields |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|