How to Export Archive.csv to MSSQL

02/11/2013 06:57 神の火#1
Hello guy’s, the other day i find in my brain, how to export file.csv to ”SQL”
For Why ?
Because is much important

Example: i’m in the " Python" Mobs.Sdata and extract the file, and give Mobs.csv and my "DB" have other Mobs .

Un~

I find in my brain, And Discovery the code for " EXPORT " to DB the fabulous archive.csv

How ?

In QUERY
Copy the code and paste

First
Code:
USE YOU_DB
TRUNCATE TABLE  YOU_Table
GO
Ok, Now YOu Table not have Text.


Second
Code:
BULK INSERT PS_GameData..Mobs FROM 'C:\Mobs.csv'
WITH (DATAFILETYPE ='char',
FIELDTERMINATOR =',',
ROWTERMINATOR = '\n'
)


In 'C:\Mobs.csv' Define you location for you file.csv example 'C:\Goku.csv'

And Good you have to all mobs the Mobs.SData your DB....