Can we able to use Array Concept in SQL

Posted by Somasundaram under Sql Server on 7/2/2012 | Points: 10 | Views : 1411 | Status : [Member] | Replies : 2
Hi.,

Can we able to use Array Concept in SQL:

Example:

Select Query: Select empcode, empname from employee
OUTPUT of Query
empcode empname
0001 xxx
0002 yyy

I need the above returned table in Array as,
ArrayName[0][0] 0001
ArrayName[0][1] xxx
ArrayName[1][0] 0002
ArrayName[1][1] yyy


Thanks in Advance,

Regards,
Somasundaram




Responses

Posted by: Kamalakanta.Nayak09 on: 7/2/2012 [Member] Starter | Points: 25

Up
0
Down
Not possible

Thanks,
K.K

Somasundaram, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Pandians on: 7/2/2012 [Member] [MVP] Silver | Points: 25

Up
0
Down
We don't have direct way to use an Array in SQL Server. But, we can by using OLE Automation objects
i.e: sp_OAMethod

Normally, Single row and columns will be considered as Single dimensional and Multi-row with multi column will be considered as Multi dimensional array of data.

But, It differs in various area where we going to use them.
i:e You can use table type parameters when passing single/multidimension array of data in stored procedures as a parameter!

Cheers
www.SQLServerbuddy.blogspot.com
iLink Multitech Solutions

Somasundaram, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response