Thanks.  I had thought about doing it that way, it just seems a bit
pointless (and it means that the query won't get optimised by the server).

It seems like there should be a way of changing a string to a list in SQL.
Isn't there?

Paul

> this SP and list stuff should do it :
> 
> CREATE PROC dbo.paulsp
> (
>       @paullist varchar(300)
> )
> AS
> BEGIN
>       SET NOCOUNT ON
> 
>       DECLARE @SQL varchar(600)
> 
>       SET @SQL = 
>       'SELECT *
>       FROM dbo.tbl
>       WHERE OrderID IN (' + @paullist + ')'
> 
>       EXEC(@SQL)      




-- 
** 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