| 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> |
|---|---|---|
| ||
| Previous by Date: | Update table 1 with data from Table 2?, newportri |
|---|---|
| Next by Date: | Re: Update table 1 with data from Table 2?, Dan Bracuk |
| Previous by Thread: | Re: Ignoring Rows with Empty Fields?, Kronin555 |
| Next by Thread: | Re: Ignoring Rows with Empty Fields?, silstorm |
| Indexes: | [Date] [Thread] [Top] [All Lists] |