Hey Josh,

You're missing your AND operator and doubling up on the WHERE.  Try this:

from office
inner join state on office.state=state.state_id
where active = 1
and adcompany = 4
AND office_num in (<cfquery...

-joe
----- Original Message -----
From: Joshua OConnor-Rose <[EMAIL PROTECTED]>
Date: Thu, 29 Jul 2004 10:41:57 -0700 (PDT)
Subject: RE: Question about cfqueryparam
To: CF-Talk <[EMAIL PROTECTED]>

I'm back to this now

Anybody seen this before?

[Macromedia][SequeLink JDBC Driver][ODBC
Socket][Microsoft][ODBC Microsoft Access Driver]
Syntax error (missing operator) in query _expression_
'active = 1 and adcompany = 4 where office_num in
(Pa_RaM000,Pa_RaM001,Pa_RaM002)'.

it says my sql looks different too:

select
office.office_id,office.office_num,office.office_name,office.city,state.state

from office
inner join state on office.state=state.state_id
where active = 1
and adcompany = 4
where office_num in ( (param 1) , (param 2) , (param
3) ) order by office.office_num

-Joshua O'Connor-Rose
-All is Good

--- Pascal Peters <[EMAIL PROTECTED]> wrote:

> I forgot to delete "#request.filter#" in the query
> below
>
> > -----Original Message-----
> > From: Pascal Peters [mailto:[EMAIL PROTECTED]
> > Sent: 29 July 2004 17:23
> > To: CF-Talk
> > Subject: RE: Question about cfqueryparam
> >
> > You can't use cfqueryparam like this, it won't get
> evaluated. It has
> to
> > be in the cfquery.
> >
> > <cfquery datasource="media" name="get_office">
> > select office_id
> > from office
> > #request.filter#
> > where 0=0
> > <cfif len(attributes.office_num)>
> > and office_num in (<cfqueryparam list='Yes'
> > value='#attributes.office_num#'
> > cfsqltype='CF_SQL_VARCHAR'>)
> > </cfif>
> > </cfquery>
> >
>
>________________________________
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to