Re: Help with a list variable
On 3 Aug 2005 10:38:43 -0700, Erich93063 wrote:
>I have made the following test stored proc that all it does right now
>is accept a string variable that will be a list ie. :5,9,6,13. Right
>now all the SP is doing is creating a temp table to store the values in
>the list, then looping through the list and inserting the values into
>the temp table, then selecting all the records from teh temp table.
>It's WORKING however i must have done something wrong because it's not
>inserting ALL the values. If the list is "5,9,6,13" only 5, 9 and 6
>will get inserted, not the 13. if I pass in the list like this
>"5,9,6,13," with an extra comma at the end, they all get inserted fine
>but thats not how the strings will be coming in. Here's what I have so
>far:
Hi Erich,
http://www.sommarskog.se/arrays-in-sql.html
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)
.
Relevant Pages
- Re: faster way to write tables?
... What I've found to be the fastest way of inserting hundreds/thousands of records into a table which might already contain millions of rows, using ADO in Access/SQLserver is to use RecordSets and insert via a temporary table ... Create a new temp table which exactly matches the structure of the target table... ... For inserting millions of rows (into an Access database from SQLserver) I still haven't found anything which performs as well as... ... According to a random database creation log that I'm looking at, Access can insert 3 million rows in just over 70 seconds ... (borland.public.delphi.database.ado) - Re: Row Order
... but that doesn't guarantee they will be located in the ... IDENTITY property, then can I assume that the IDENTITY property will ... Remember this is a TEMP table I'm ... >> I'm inserting rows into a temp table via a SELECT statement that has an ... (microsoft.public.sqlserver.programming) - Re: help with C
... I dont know what you want i need hel with the inserting, ... List temp; ... List *prev = NULL; ... List *curr = NULL; ... (comp.lang.c) - Help with a list variable
... then looping through the list and inserting the values into ... the temp table, then selecting all the records from teh temp table. ... DECLARE @startingPosition int ... (comp.databases.ms-sqlserver) - Re: Row Order
... Server will insert the rows wherever it can. ... the rows back out of the table, SQL Server can access them in whatever order ... > I'm inserting rows into a temp table via a SELECT statement that has an ... > ORDER BY clause because I need for the rows to exist in the temp table in ... (microsoft.public.sqlserver.programming) |
|