Hi guys, I'm new here. I have a problem though. I can perform a bulk insert from .csv file to MS SQL Server 2005. My problem here is that there are foreign tables in the .csv file. What I want to happen is that these data should be replaced with their IDs.
Here is an example:
-sample.csv-
Id Name Type
== ==== ====
1 Name1 Type1
2 Name2 Type2
3 Name3 Type1
-referencetb-
Id Type
== ====
1 Type1
2 Type2
3 Type3
-Maintb (After bulk inserting)-
Id Name Type
== ==== ====
1 Name1 1
2 Name2 2
3 Name3 1