If it's a list, you do not want an INT, you want a VARCHAR. So declare
it is a varchar in the SP.


> -----Original Message-----
> From: Paul Johnston [mailto:[EMAIL PROTECTED]] 
> Sent: 15 January 2003 10:48
> To: [EMAIL PROTECTED]
> Subject: [ cf-dev ] SQL question
> 
> 
> I'm a bit brain dead on the old SQL today (SQL Server 2000)
> 
> I have a list like this:
> 
> 1,2,3,4,5
> 
> And I want to pass it into a stored procedure like this:
> 
>       <cfstoredproc procedure="blah" 
> datasource="#request.datasource#" returncode="Yes">
>               <cfprocparam type="In" 
> cfsqltype="CF_SQL_VARCHAR" value="#mylist#">
>               <cfprocresult name="rstblah" resultset="1">
>       </cfstoredproc>
> 
> The query looks something like this:
> 
> SELECT *
> FROM tbl
> WHERE myvar IN ( @lstVar )
> 
> With only one variable it works fine (cos it thinks "oh yeah, 
> it's an int, so I'll change that!)
> 
> However, with more than one variable, I have an error thrown 
> saying that it doesn't like the fact I'm trying to change a 
> varchar into an int (when I'm trying to make a varchar into a 
> list of ints for use in the IN statement.
> 
> Anyone?
> 
> Paul
> 
> -------------------------------------------
> Paul Johnston
> PJ Net Solutions Ltd
> http://www.pjnetsolutions.com
> [EMAIL PROTECTED]
> +44 (0)7866 573013
> 
> 
> 
> 
> -- 
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
> 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: 
> [EMAIL PROTECTED] For human help, e-mail: 
> [EMAIL PROTECTED]
> 
> 



-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to