i just knew that in SQL, when doing an IN statment, you need to put single quotes around the items in a list and if you are using a number list, you don't have to.
i know what you mean on feeling like a new-b....i posted a question today and i know i've writen the code before, but i can't think of how to do it now. >From: Paul Ihrig <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: CF-Talk <[EMAIL PROTECTED]> >Subject: RE: IN condition... help? >Date: Mon, 17 Dec 2001 16:36:35 -0500 > >right on! >Thank you Jason! > >Now, is that something simple that i have should always have known? >i have read WACK 3 or so times. & paged through aWACK a few times. > >Where do you learn these types of things??? > >i have been using CF aggressively for almost 3 years now & still there are >days, such as this that i feel like a newb, & i am! > ><cfquery name="rs_pc2" datasource="Project_Set_Up2" dbtype="ODBC"> >SELECT Profile_Code2, Profile_Name2 >FROM tbl_Profile_Codes_2 >WHERE Profile_Code2 IN (<CFLOOP LIST="#rs_View.Project_Type_ID2#" >INDEX="i">'#i#'<CFIF i IS NOT >ListGetAt(#rs_View.Project_Type_ID2#,ListLen(#rs_View.Project_Type_ID2#))>,< >/CFIF></CFLOOP>)</cfquery> > > > > ________________________________________________________________________________ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

