Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Populate data in table from another table

$
0
0
i have a csv file like this
example:
ques_1 ques_2a ques_3 ques_4...
4       5       28     27


i have two tables survey,surveyanswers


right now im populating data from csv file into survey table like this but i want to insert answers for each id in survey table insted of id numbers how is this possible.
survey table : columns
s_id ques1 ques2a ques3 ques4
1     1      4     6      7

-------------------------------------------------------
surveyanswers table with columns and values
id ques answers
1   1     yes
2   1      no
3   1     2
4   2      5
5   2      2
6   3      1
7   4      1
...38


In surveyanswers table i have 38 id's column is identity ,for id =1----ques_1 id=2-------ques_1 id=3----------ques_1,id=2---------ques_2

I want to insert ansers for question id's in survey table 



Viewing all articles
Browse latest Browse all 23857

Trending Articles



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