ASP.NET (35) SQL (25) JAVASCRIPT (24) HTML (14) STYLE SHEET (6) ASP (4) SCRIPT (1)

Search me out HERE!!

BULK INSERT INTO TABLE FROM COMMA SEPERATED .txt FILE IN SQL

Below code can be used in SQL SERVER 2005 to insert bulk value in Table from .txt file (Values are separated by comma ',' ).

BULK
INSERT testing_table
FROM 'c:\testing.txt'
WITH
(
    FIELDTERMINATOR = ',',
    ROWTERMINATOR = '\n'
)

GO

Note : c:/testing.txt is file from which data need to be uploaded. Also here testing.txt file will contain values with ',' separator and new row is in new line.

No comments:

Post a Comment