I interpret and understand your question.  Getting IDs from a form field and
getting a field from a table in a query are two totally different things.
Fields are sets of information, not just plain text.  CID in
(#form.fieldname#) has the advantage of being interpretted BEFORE going to
the Provider (JET).  When you use a query with fields, the provider
interprets the entire fied as a single parameter.

Let me try in another way:

id    name
------------
1     Joe
2     Bob
3     Larry


id   strIDs
-----------
1    1,2,3

You have a query like this:

<CFQUERY name="listData">

  SELECT strIDs FROM TableB WHERE id = 1

</CFQUERY>

<CFQUERY name="Names">

  SELECT a.name
  FROM   TableA As a
  WHERE  a.id IN (#listData.strIds#)

</CFQUOERY>


David L. Penton, MCP
Consultant
"Mathematics is music for the mind, and Music is Mathematics for the
Soul. - J.S. Bach"
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Dave Cahall
Sent: Thursday, February 08, 2001 11:11 AM
To: [EMAIL PROTECTED]
Subject: Re: CFQUERY Question


Either I do not understand what you are saying or you are misinterpreting
my question.

What do you mean by doing a SELECT first to get the value in a previous
CFQUERY?

Can I do a loop over the field creating a variable that is numeric values
(all inside my CFQUERY)?

I have done this many times when getting IDs in a form field and then
using that form field such as:
CID in (#form.fieldname#) and that worked fine

Here is a more precise description of what I am trying to do.

I am running a list of engagements.  One of the fields in the engagement
record contains a list of the IDs of the consultants assigned to the
engagement.  On the engagement master list, I want to display the names
of the consultants.

-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com

-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org


-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com

-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

Reply via email to