Hi Kym,
THANKS! That's exactly what I'm looking for! Really a great help!! ;)
roger
----- Original Message -----
From: "Kym Kovan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 12, 2000 2:56 PM
Subject: Re: I have a problem..
> Hi Roger,
>
> >I have two huge tables with alot of fields. One of the table is driven by
a
> >form which will be filled by user and not all the fields are compulsory.
> >
> >I am required to compare these two tables and to match the correct data
out.
> >
> >However I can't perform a <CFQUERY> with lots 'AND' criteria because some
of
> >the fields are NULL. I only need to match those fields that the user
enter.
>
> What you can do very crudely is wrap the AND sections with <cfif
> len(suspect_var)> tags so that you only do the AND if there is something
in
>
> the field:
>
> Select stuff
> from somewhere
> where 1=1
> <cfif len(suspect_var)> and ColumnName = #suspect_var#</cfif>
>
> etc.
>
>
>
> --
>
> Yours,
>
> Kym
>
> --------------------------------------------------------------------------
----
> Archives: http://www.mail-archive.com/[email protected]/
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.