-
Array as a parameter to stored procedure.
Is it possible to accept an array ( or any data structure representing
an ordered set ) as an input parameter in a stored procedure? The
number of elements will vary from call to call.
DB: MS SQL 7 on NT
Thanks.
Ellen.
-
Re: Array as a parameter to stored procedure.
No, SQL Server does not support any array parameters.
The only workaround I know of is to pass a delimited string of values into
a stored procedure, create a #temp table, then inside of a while loop parse
the values into the temp table.
Ellen Khlystova <ekhlystova@ksminc.com> wrote:
>Is it possible to accept an array ( or any data structure representing
>an ordered set ) as an input parameter in a stored procedure? The
>number of elements will vary from call to call.
>
>DB: MS SQL 7 on NT
>
> Thanks.
> Ellen.
>
>
-
Re: Array as a parameter to stored procedure.
No, SQL Server does not support any array parameters.
The only workaround I know of is to pass a delimited string of values into
a stored procedure, create a #temp table, then inside of a while loop parse
the values into the temp table.
- Phil
Ellen Khlystova <ekhlystova@ksminc.com> wrote:
Is it possible to accept an array ( or any data structure representing an
ordered set ) as an input parameter in a stored procedure? The number of
elements will vary from call to call.
DB: MS SQL 7 on NT
Thanks.
Ellen.
-
Re: Array as a parameter to stored procedure.
Phil,
Thanks for the prompt reply.
I already parse a NVARCHAR ( 511 ) string, but this is not an "elegant"
solution...
Ellen.
-
Re: Array as a parameter to stored procedure.
check out http://www.mssqlserver.com/faq/development-array.asp
"Ellen Khlystova" <ekhlystova@ksminc.com> wrote in message
news:3A6F3EDF.17E0F8E6@ksminc.com...
> Is it possible to accept an array ( or any data structure representing
> an ordered set ) as an input parameter in a stored procedure? The
> number of elements will vary from call to call.
>
> DB: MS SQL 7 on NT
>
> Thanks.
> Ellen.
>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks