I am using SQL Server and I need to load some data from a .txt file into my database table which I already created and set its columns properly.
The .txt has this format all along and it is really big (170MB). The first line simply shows the columns, so it needs to be ignored.
This is how the .txt format looks like. I renamed the names for simplicity.
Col1||Col2||Col3||Col4
101||200||hello||world
104||202||hi||world
...
Looking at the MSDN documentation, I suppose need something similar to this:
BULK INSERT db1.table1
FROM 'C:\file1.txt'
WITH
(
FIELDTERMINATOR = '||'
)
Is this syntax correct ? How would I manage to ignore the first line ? I unfortunately do not have any way to confirm the syntax for right now.