Is there any way to converte from .txt to a SQL table... ?
Printable View
Is there any way to converte from .txt to a SQL table... ?
u can import
BULK INSERT _XXX FROM 'c:\txtnamehere.txt' -- _xxx = table name
Thanks ! :) but i have this error ...Quote:
BULK INSERT _RefShopGoods FROM 'C:\FULL_BLUE\refshopgoods.txt'
Quote:
Bulk load: DataFileType was incorrectly specified as char. DataFileType will be assumed to be widechar because the data file has a Unicode signature.
Bulk load: DataFileType was incorrectly specified as char. DataFileType will be assumed to be widechar because the data file has a Unicode signature.
Bulk load: DataFileType was incorrectly specified as char. DataFileType will be assumed to be widechar because the data file has a Unicode signature.
Msg 2627, Level 14, State 1, Line 1
Violation of PRIMARY KEY constraint 'PK__RefShopGoods_renewal'. Cannot insert duplicate key in object 'dbo._RefShopGoods'. The duplicate key value is (15, MALL_ARCHEMY_ASTRAL, PACKAGE_ITEM_ETC_ARCHEMY_MAGICSTONE_ASTRAL_01).
The statement has been terminated.
duplicate key...
i use it when need import full tables like _refskill
do back up of _Refshopgoods and TRUNCATE TABLE _REFSHOPGOODS now import from the .txt
lol so the duplicate is on the .txt search and delete ...
hey guys, im new with sql server and i want to import a txt file in a "_RefRegion" table with jupiter temple data but with bulk insert i get 3 errors. By reading this post i supose that i have to make a backup and insert all rows at same time after delete the table with "TRUNCATE".
Is any way to add all table data in the same txt file (jupiter temple data which is on txt file already and RefRegion data which is on the table)?
Thank you guys! :)