macromedia.coldfusion.database_access
[Top] [All Lists]

Re: Ignoring Rows with Empty Fields?

Subject: Re: Ignoring Rows with Empty Fields?
From: "Dan Bracuk" <webforumsuser@xxxxxxxxxxxxxx>
Date: Mon, 28 Jul 2008 17:44:00 +0000 (UTC)
Newsgroups: macromedia.coldfusion.database_access

[q][i]Originally posted by: [b][b]Kronin555[/b][/b][/i]
 Why not just do:
 <cfquery name="getsimilar" datasource="#datasource#" maxrows="5">
 SELECT catshortname, soshortname, retailer_name
 FROM merchants
 WHERE soshortname is not null and soshortname != ''
 AND catshortname='#getmerchant.catshortname#'
 ORDER BY retailer_name ASC
 </cfquery>

 The reason there's 2 checks is I'm not sure if you're storing empty values as 
nulls or empty strings.[/q]
 Just so you know, this:
 and soshortname != ''
 makes this
 WHERE soshortname is not null
 unnecessary.



<Prev in Thread] Current Thread [Next in Thread>