Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple array question

Status
Not open for further replies.

sami

Programmer
Nov 29, 2000
2
AU
I am new to SQL server..I am wondering how to declare an array of varchar and assign it a value...
lets say that I have a table
<<order>>
orderid memberid orderitem
1 1 Hammer
2 1 Nails
3 1 Screw-Driver
4 2 Bruger

now how to define a simple stored procedure which will decalre an array of varchar and assign them all the order items of user # 1

thanx in advance
Cheers,
Sami
 
SQL Server itself doesn't directly support true arrays (you could simulate it with @MyVar1, @MyVar2, etc), but it may be supported by an ODBC client using SQLGetData. It doesn't sound like that's what you are after, though.

Robert Bradley

 
Why not simply issue an UPDATE statement and forgo storing them in a variable to begin with?


Thanks,

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top