tags:

views:

25

answers:

1
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?

+1  A: 

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.

littlegreen