[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 317
  • Last Modified:

SQL 2000 or 2005 and array...

I am wondering if it is possible to run a selct query in a sp, and have the output variable return an array of the rows?
0
kevp75
Asked:
kevp75
  • 3
  • 2
  • 2
  • +1
3 Solutions
 
ThejakaCommented:
A table variable can be returned from a UDF, but not an SP.

How do you intend to use the returned values?
0
 
howyueCommented:
as far as i know there are no array in sql server, for 1 dimension array u can convert it as string for m-dimension. can u explain how to uexpect ur output to be ?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
kevp75Author Commented:
I guess, I am wondering if I can return a recordset from a sp... in code...

(please bear with me, I usually only use sql to store data... not do the work...)
0
 
kevp75Author Commented:
sorry.  in code as in, I'll be calling this from a classic asp page ...
0
 
howyueCommented:
u can write a sp that contains ur query and return the resultset in XML. and with XML i'm sure XML is more convenient for asp than array
0
 
ThejakaCommented:
You CAN indeed do as you intend...

http://support.microsoft.com/kb/306574


Alternately, you could use a table-valued UDF.
0
 
kevp75Author Commented:
thanks folks
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now