Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

Inserting bulk values into a table in sql server2008

$
0
0

Hi All,

         I am stuck up with inserting bulk values into a table,Pls help me out with this.

I want to make a bulk insert into a table, Here i am getting two list of values as a parameter. Below is the List1 where i get  all the column values,For single insert i consider only List1 values.

Below is the format of list2, This info is passed only at bulk insert.

TrackNames                          ID

10_Main1 to 25_Main1          1

25_P to 50_P                         2

Single insert is working fine, When it comes to bulk insert below points needs to be concentrated

1. From the list2 for the given range i should fetch the values. i.e. 10 to 25 between these range il get a list of values,ex: i may get around 10 records for that range,Hence all the 10 records needs to be inserted into the table.

.

Above is the screenshot i get from the list2 range.Only these columns i get from list list2, remaining column values are same as List1 values.In case of bulk update  In List1 BegMP,BegTrackName,EndMP,EndTrackName is kept NULL and those values are fetched from above screenshot and inserted into a table.

Please suggest me how can i achieve this. Thanks in advance


Deepa


Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>