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.
| Author |
Topic |
|
smhjm
Starting Member
3 Posts |
Posted - 2005-12-18 : 08:20:27
|
| Hello MyFriendsI want insert too many data to a table and doing this with StoredProcedures but i want now an array in sqlserver that get my data and insert those data in my tablehow i define an array in sql server or T_SQl has an array or you have any solution for this? Plaese help to methanks smhjm |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2005-12-18 : 10:10:38
|
| Welcome to SQLTeam.There is no array in T-SQL. You don't need array anyway. What are you trying to achieve ? Post your table structure, sample data & required result. We will be able to advice you accordingly-----------------[KH]Learn something new everyday |
 |
|
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-12-19 : 00:57:06
|
| Do you want to pass csv values and do search based on that?MadhivananFailing to plan is Planning to fail |
 |
|
|
smhjm
Starting Member
3 Posts |
Posted - 2005-12-19 : 07:02:41
|
| Hi I have a checkBoxList that get its data from a table.User checked any item that want and i should insert this data in another table with an id that define the user.For example user checked 20 books and i should insert 20 row in my table that any row has an id of book and an id of that user.I should do this with storedProcedure but i can't use of variable because i don't know how many item was checked with user.Know i want with just one connection to database do this inserting.I use of c#. what your idea about doing this just with storedProcedures.thanks advanced.smhjm |
 |
|
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2005-12-19 : 07:39:05
|
| Actually quite simple.I would advice you 1. Pass a csv string to calling SP2. Create a while loop in your sp to accept the csv string 3. do an insert based on each "DYNAMIC" csv stringIt really dont matter what front end you are using as long as you pass your csv and get your sp right, i woudl advice you paste your sp code heredo u understand ?afrika |
 |
|
|
|
|
|