Reputation: 60791
USE AdventureWorks2008R2;
GO
INSERT INTO myTestSkipField
SELECT *
FROM OPENROWSET(BULK 'C:\myTestSkipField-c.dat',
FORMATFILE='C:\myTestSkipField.fmt'
) AS t1;
GO
i dont want to specify a formatfile
!!! i just want to specify the format inline. is this possible?
Upvotes: 0
Views: 1089
Reputation: 7420
It is not possible to specify the format as a parameter to either OPENROWSET
or BULK INSERT
.
You can however insert the data into a view. IMO this is an elegant solution.
Upvotes: 1