Are the tables structured the same way ..(ie are they duplicated)?
Paul Giesenhagen
QuillDesign
----- Original Message -----
From: "Paul Campano" <[EMAIL PROTECTED]>
To: "SQL" <[EMAIL PROTECTED]>
Sent: Thursday, January 16, 2003 1:34 PM
Subject: Two table query issue
> I have two tables, tremont and charles I want to query info from both
tables, but filter the results based on form variables. Something like this
works
> fine:
>
> SELECT ID, category, title, format, store
> FROM charles
> WHERE 0=0
> <!--- conditions passed from search --->
> <cfif isdefined("form.title") IS "yes">
> <cfif form.title IS NOT "">
> AND title LIKE '#form.title#'
> </cfif>
> </cfif>
>
> but if I try this and add tremont, the second table, into the FROM clause
I get this error:
>
> The specified field 'ID' could refer to more than one table listed in the
FROM clause of your SQL statement.
>
> How can I get results from both tables and still be able to filter them
through the form variables? Thanks
>
>
> Paul
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=6
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=6
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm