Hi I have a text file I want to put it in a table with 14 columns. Text file in the form of a file .txt notpade and the table I want in table in sqlserver Being in the form of a file with a sample of data I am very grateful and grateful that you can fix the problem because I do not really know how to do it excel file notpad --import data in sql server : https://www.dropbox.com/s/lsw1tgsimlr6z5i/ququ.txt?dl=0 excel sample table and data after insert notpade file ; https://www.dropbox.com/s/zozykrqp982jbov/sample_ququ.xlsx?dl=0
USE demo_test --- Create Table IF OBJECT_ID(N'TempDb..MyTemp',N'U') IS NOT NULL DROP TABLE MyTemp CREATE TABLE MyTemp ( MyTime time, MyEXCEPTION VARCHAR (1000), MyActio VARCHAR (1000) , MyJSON VARCHAR (max) ) GO
13.0 4 1 SQLCHAR 0 8 "\t" 1 MyTIME "" 2 SQLCHAR 0 1000 "\r\n" 2 MyException SQL_Latin1_General_CP1_CI_AS 3 SQLCHAR 0 1000 "\r\n" 3 MyAction SQL_Latin1_General_CP1_CI_AS 4 SQLCHAR 0 0 "\r\n\r\n" 4 MyJSON SQL_Latin1_General_CP1_CI_AS
BULK INSERT MyTemp FROM 'C:\bayat\b.log' WITH (FORMATFILE = 'C:\bayat\LogImp1.fmt');
Msg 4862, Level 16, State 1, Line 15 Cannot bulk load because the file "C:\bayat\LogImp1.fmt" is incomplete or could not be read. Operating system error code (null).
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)