ValueList would be the simplest means of doing what you need.
SELECT id
FROM tableName
ORDER BY id
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 29, 2006 8:08 AM
To: CF-Talk
Subject: CFQUERY: comma delimited list of id values
All,
coldfusion.developer wrote:
>
> I'm trying to figure out how best to pass a list of comma delimited id
> (numeric) values to another query.
>
>
> select *
> from dbo.tbl_recipe_monthly_winner
> where (month(recw_assign_month )= 01) AND (year(recw_assign_month )=
> 2006)
>
SELECT
*,
R
[EMAIL PROTECTED] wrote:
> All,
>
> I'm trying to figure out how best to pass a list of comma delimited id
> (numeric) values to
> another query. I'm having trouble with getting the list of id values to not
> have a "," (comma)
> after the last value in the output. Any help would be very appre
A few ways depending on what you need.
Look at ValueList(). A very useful function. Or combine the first query in
the second:
SELECT *, dbo.recipeingredients.ingredients, dbo.addresses.firstname,
dbo.addresses.lastname,
dbo.recipes.recipeID, dbo.recipes.recipename, dbo.recipes.recipedesc,
You could try a couple different ways... First you could use
#valuelist(get_rec_4month.recipeID)# as the list
Or you could just put the query that gets the recipeIDs in the IN () section
of the final query like so...
WHERE dbo.recipes.recipeID IN
(
select recipeid from dbo.tbl_recipe_monthly
Try this:
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 29, 2006 7:38 PM
To: CF-Talk
Subject: CFQUERY: comma delimited list of id values
All,
I'm trying to figure out how best to pass a list of comma delimited id
(numeric) values to
ano
6 matches
Mail list logo