Sybase 11 - Array Emulation or Replace character in deliminated string
I am pulling my hair out trying to produce a efficient solution to a problem
I have.
I need to generate a SQL 'IN' statement on the fly in a stored procedure,
I wanted to pass an array into the procedure to generate the IN statement
but I don't believe this can be done. So instead I need to pass in some deliminated
text, which cannot be comma deliminated! So please could some one suggest
how I should replace my deliminator in SQL with a new deliminator so I can
assign this to a new variable to be held in the IN statement!
I would appreciate any suggestions anybody has!
Re: Sybase 11 - Array Emulation or Replace character in deliminated string
Since SQL Server and Sybase were once one I will give you my standard SQL
Server answer:
http://www.mssqlserver.com/faq/development-array.asp
also see http://www.algonet.se/~sommar/dynamic_sql.html
--
HTH,
David Satz
Principal Web Engineer
Hyperion Solutions
{ SQL Server 2000 SP2/6.5 SP5a } { Cold Fusion 5 SP1 } { VSS }
(Please reply to group only - emails answered rarely)
-----------------------------------------------------------------
"John" <john.bridle@marsh.com> wrote in message
news:3cb182c9$1@10.1.10.29...
>
> I am pulling my hair out trying to produce a efficient solution to a
problem
> I have.
>
> I need to generate a SQL 'IN' statement on the fly in a stored procedure,
> I wanted to pass an array into the procedure to generate the IN statement
> but I don't believe this can be done. So instead I need to pass in some
deliminated
> text, which cannot be comma deliminated! So please could some one suggest
> how I should replace my deliminator in SQL with a new deliminator so I can
> assign this to a new variable to be held in the IN statement!
>
> I would appreciate any suggestions anybody has!