Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Openrows set command failed while inserting data from .txt file using Bulk of openrowset

$
0
0

Hi Team,

The openrowset command failing on importing the file from .txt file.

The table structure where the data to be loaded.

CREATE TABLE [dbo].[tblAvayaCMShagent_Test](
 [Row_Date] [datetime] NULL,
 [StartTime] [int] NULL,
 [Intrvl] [int] NULL,
 [ServerId] [uniqueidentifier] NULL,
 [SiteId] [decimal](18, 0) NULL,
 [Timestamp] [datetime] NULL,
 [TimestampLocal] [datetime] NULL,
 [TimestampUTC] [datetime] NULL,
)

GO

Data to be inserted of  (2 rows)

'20140224', 630, 30, '06231cd2-71c6-4102-adbc-bf87eead2d5e', 857866693038890119, '20140224 06:30:00', '20140224 04:30:00', '20140224 12:30:00'

'20140224', 630, 30, '06231cd2-71c6-4102-adbc-bf87eead2d5e', 857866693038890119, '20140224 06:30:00', '20140224 04:30:00', '20140224 12:30:00'

SQL Command used

INSERT INTO tblAvayaCMShagent_Test
Select (
SELECT *  FROM  OPENROWSET(BULK N'C:\TEMP\AvayacmshAgent.txt', SINGLE_BLOB)
 [rowsetresults]  );

Failed error :

Msg 213, Level 16, State 1, Line 1

Column name or number of supplied values does not match table definition.

Can somebody help me ?


Samir


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>