Array in Stored Procedures 
Author Message
 Array in Stored Procedures

Hi,

Do stored procedures support array?

I have a set of variable being return from a query


from table where blablabla.

and i want to use them in a loop.

I use a couter


Begin

End

I know this does not work but this is what I'm trying to accomplish.

Do you have a solution for this?




Tue, 04 Mar 2003 03:00:00 GMT
 Array in Stored Procedures

Franck,

Neither ANSI SQL-92 nor T-SQL support array structures.

----------------------------------------------------------------
BP Margolin
Please reply only to the newsgroups.
When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc.) which
can be cut and pasted into Query Analyzer is appreciated


Quote:
> Hi,

> Do stored procedures support array?

> I have a set of variable being return from a query

> select



> from table where blablabla.

> and i want to use them in a loop.

> I use a couter


> Begin

> End

> I know this does not work but this is what I'm trying to accomplish.

> Do you have a solution for this?





Tue, 04 Mar 2003 03:00:00 GMT
 Array in Stored Procedures
Franck,
I think  you could create a COM DLL in vb/c/j++  that wraps an
array/collection/custom data structure and add methods to search, find,
set, get elements.  Then you can use the stored procedure sp_OACreate
to instance it and sp_OAMethod to call methods and
sp_OAGetProperty /sp_OASetProperty to get/set properties.

Quote:
> Franck,

> Neither ANSI SQL-92 nor T-SQL support array structures.

> ----------------------------------------------------------------
> BP Margolin
> Please reply only to the newsgroups.
> When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc.)
which
> can be cut and pasted into Query Analyzer is appreciated



> > Hi,

> > Do stored procedures support array?

> > I have a set of variable being return from a query

> > select



> > from table where blablabla.

> > and i want to use them in a loop.

> > I use a couter


> > Begin

> > End

> > I know this does not work but this is what I'm trying to accomplish.

> > Do you have a solution for this?



Sent via Deja.com http://www.deja.com/
Before you buy.


Wed, 05 Mar 2003 03:00:00 GMT
 Array in Stored Procedures

Why not return a result set and let the "calling code" process that result set?

--
Tibor Karaszi, SQL Server MVP
Please reply to the newsgroup only, not by email.
FAQ at: http://www.sql-server.co.uk/frmMain.asp


Quote:
> Hi,

> Do stored procedures support array?

> I have a set of variable being return from a query

> select



> from table where blablabla.

> and i want to use them in a loop.

> I use a couter


> Begin

> End

> I know this does not work but this is what I'm trying to accomplish.

> Do you have a solution for this?





Fri, 07 Mar 2003 03:00:00 GMT
 
 [ 4 post ] 

 Relevant Pages 

1. how to send an array into stored procedure

2. Passing arrays to stored procedures

3. passing arrays into stored procedures

4. passing arrays into stored procedures

5. Can I use array in stored procedure?

6. How to pass an array to store procedure

7. How to pass an array to store procedure

8. Question on arrays in Stored procedures and currency conversion

9. returning arrays in stored procedures

10. Passing a one dimentional array to stored procedure (as varchar) and retreiving

11. Passing an array to Stored Procedure

12. can i use array in store procedure?


 
Powered by phpBB® Forum Software