To import a comma separated file or CSV file using the database, you should first create a table on the SQL server. Tables that are created is useful for importing CSV file.


Step 1:
Open the SQL studio and sign in using the right credentials and do a right click on the desired target database. You can right click on the whole DB, instead of the table in the DB.

Step 2:
The wizard with introduction page will be opened. So, when the page is opened simply proceed to click on next. This screen is shown for the selection of DS(data source) from the list that is shown. From this data source click on the flat file which is shown as a drop down and click browse.

Step 3:

You will see an explorer that is opened out choose the CSV file from the given list, to ensure that you are selecting the file type to choose the file type as CSV

Step 4:
After selecting the designated file, please take few mins to configure on importing the data inside DB by selecting the list of columns displayed before choosing next

Step 5:
After this is done, kindly review the columns you could see advanced options. This evaluation is needed before you import a CSV file.

Step 6:
If you find some character that is larger than fifty, request SQL for inspecting the columns in that file. This final assessment can be done by clicking on the Suggest type button on the SQL server. SQL servers are instructed only to examine the first hundred Rows. An error will be pointed during these examine process.

Step 7:
You could be redirected to one of the preview section in the DS (data source).

Step 8:
After you did the final evaluation on the preview section and if it is fine you can select the destination DB

Step 9:
In the step, you can select the destination DB. SQL will normally select the desired tables. Else if you are not satisfied, then you are required to create your own table or you would like to choose an alternate table that is shown in the DB then if you are fine click on the desired column in the DB

Step 10:
You must save it as an SSIS package. You can even leave by not choosing that option and proceed to next

Step 11:
You will see a verification screen. If it's fine, then you can import by clicking on the finish button


Var dette svaret til hjelp? 0 brukere syntes dette svaret var til hjelp (0 Stemmer)