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 |
|
guriya
Starting Member
1 Post |
Posted - 2011-11-22 : 23:17:27
|
| Hi There,Can someone please help me with building a interface to bulk add data to a sql table which only has unique key columns.i.e. i have a table which contains a record of a student's work experience (with discipline_ID, Special_topic_ID, Location_ID) etc.the descriptive names for each of these are in separate tables. So a table each for discipline, special topic, location etc. I have 100 rows of data to import from an excel which off course only has the descriptive text for each column.So an example row of data would be:Student ID | discipline name | Special Topic Name |10000111 Medicine CardiologyI need a way of importing the textual data into this table (Student's work experience) and for it to go and fetch the relevant unique ids automatically.The only thing i could think of was creating web based forms with each field being a lookup and upon clicking submit, the back end .net (ish) code figures out the unique IDs etc.However, this will take me years as i've only just started programming again.Any other ways within SQL Server 2008?Perhaps a new table where i can add the descriptive text as is in the 'lookup' tables and then some insert into work experience table sql stored procedure that grabs values from this table and figures out the unique ids?Any help will be appreciated...i hope the scenario makes sense?the unique id columns by the way are datatype uniqueidentifiers\GUID.Ta!Regards,GMIT PM/BA |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-11-22 : 23:42:34
|
| i think what you can do is to add a ssis package using flat file source to read data from your file, add a few lookup tasks to lookup and get ids corresponding to descriptive texts from different tables and then oledb destination to populate your table with the whole set of ids. You can even configure to call this ssis package from front end screen and it will do bulk loading on backendsee below to get a starthttp://blog.sqlauthority.com/2011/05/12/sql-server-import-csv-file-into-database-table-using-ssis/------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|