RE: CFQUERY: comma delimited list of id values

2006-11-29 Thread Andy Matthews
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,

Re: CFQUERY: comma delimited list of id values

2006-11-29 Thread Jochem van Dieten
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

Re: CFQUERY: comma delimited list of id values

2006-11-29 Thread Jim Wright
[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

RE: CFQUERY: comma delimited list of id values

2006-11-29 Thread Adrian Lynch
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,

RE: CFQUERY: comma delimited list of id values

2006-11-29 Thread Bobby Hartsfield
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

RE: CFQUERY: comma delimited list of id values

2006-11-29 Thread Ben Koshy
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