Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Array in a Stored Procedure

Author  Topic 

vnswathi
Starting Member

8 Posts

Posted - 2006-06-01 : 17:12:17
Can any one help me with a sample code, which can take an array of
elements as one of it's parameters and get the value inserted into a table in a stored procedure.



Thanks in advance

vnswathi.

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-06-01 : 17:46:47
What would this "array of elements" look like? What data type? How could you tell what each element was?




CODO ERGO SUM
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2006-06-01 : 20:01:32
>> Array of elements

Do a search in this forum on CSV

>> Get the value inserted into a table
use the scope_identity() function
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-06-02 : 01:55:18
http://vyaskn.tripod.com/passing_arrays_to_stored_procedures.htm

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

RyanRandall
Master Smack Fu Yak Hacker

1074 Posts

Posted - 2006-06-02 : 06:16:14
A few more relevant links...

http://www.sommarskog.se/arrays-in-sql.html
http://www.sql-server-performance.com/mm_list_random_values.asp
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms=CSV,Splitting%20delimited%20lists,Best%20split%20functions (highlighted links)


Ryan Randall
www.monsoonmalabar.com London-based IT consultancy

Solutions are easy. Understanding the problem, now, that's the hard part.
Go to Top of Page

vnswathi
Starting Member

8 Posts

Posted - 2006-06-02 : 17:05:23
Thank you all, i really appreciate your help.

Thanks,
Swapna.
Go to Top of Page
   

- Advertisement -