You might try this instead of creating the array.
<cfset myDWGlist = quotedValueList(getAllCus.cfgid)>

And in the SQL statement if your quotes are being
'rearranged' use this PreserverSingleQuotes(DWGlist)



--- Ron Mast <[EMAIL PROTECTED]> wrote:

> Hi All,
> I have converted an array to a list and it looks
> like this:
>       <cfset allCusArray = arrayNew(1)>
>       <cfloop query="getAllCus">
>               <cfset allCusArray[currentRow] =
> "'"&trim(CDGDID)&"'"> 
>       </cfloop>
>       
>       <cfset myDWGlist = ArrayToList(allCusArray, ",")>
> 
> Now I want to use that list in the query as the
> value of the IN
> statement:
> 
>       <cfquery name="getAllDWGs" datasource="DSN"
> dbtype="ODBC">
>       Select  *
>       From    blah
>       where   DWGRID IN (#myDWGlist#)
>       Order by        DWGDNO
>       </cfquery>
> 
> 
> I'm getting the following error:
> [Macromedia][SequeLink JDBC Driver][ODBC
> Socket][IBM][iSeries Access
> ODBC Driver][DB2 UDB]SQL0104 - Token CBE99B83 was
> not valid. Valid
> tokens: ,.  
>   
> The error occurred in
> E:\wwwroot\data\appDWGDisplay_cusSearchForDWGs.cfm:
> line 29
>  
> 27 :  Select  *
> 28 :  From    AEQDWG
> 29 :  where   DWGRID IN (#myDWGlist#)
> 30 :  Order by        DWGDNO
> 31 :  </cfquery>
> 
> SQL    Select * From AEQDWG where DWGRID IN
>
(''CBE99B83-E8BB-07D5-ECC57AAA3A6D0F11'',''CBE99BB2-B847-C9BD-D112B583AE
> B4FF20'') Order by DWGDNO  
> DATASOURCE   blah 
> VENDORERRORCODE   -104 
> SQLSTATE   42000 
>  
> What's going on causing the rearrangement of single
> quotes? How do I fix
> this issue? Sorry if this is a dumb question. Thanks
> in advance.  
> 
> Ron Mast
> Truth Hardware
> Webmaster
> 507-444-4748
> 
> 
> 
> _______________________
> This e-mail and any files transmitted with it are
> confidential and are intended solely for the use of
> the individual to whom they are addressed.  If you
> are not the intended recipient or the individual
> responsible for delivering the e-mail to the
> intended recipient, please be advised that you have
> received this e-mail in error and that any use,
> dissemination, forwarding, printing, or copying of
> this e-mail is strictly prohibited.
> 
> 
> _______________________________________________
> Reply to DFWCFUG:
>   [email protected]
> Subscribe/Unsubscribe:
>  
>
http://lists1.safesecureweb.com/mailman/listinfo/list
> List Archives:
>    
> http://www.mail-archive.com/list%40list.dfwcfug.org/
>   http://www.mail-archive.com/list%40dfwcfug.org/
> DFWCFUG Sponsors:
>   www.HostMySite.com
>   www.teksystems.com/
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

_______________________________________________
Reply to DFWCFUG: 
  [email protected]
Subscribe/Unsubscribe: 
  http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives: 
    http://www.mail-archive.com/list%40list.dfwcfug.org/             
  http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors: 
  www.HostMySite.com 
  www.teksystems.com/

Reply via email to