import records from txt file to MS SQL database via Query analyzer

Discussion in 'MySQL' started by Kyriakos, May 15, 2008.

  1. #1
    i want to import some records from txt file to MS SQL.
    300.020.0159	W1-18002/A	W1-18002/A	1,570 	2,240 
    300.020.0160	W7-18040/A	W7-18040/A	2,330 	3,330 
    300.020.0161	W7-18023/A	W7-18023/A	2,330 	3,330 
    300.020.0162	W7-18041/A	W7-18041/A	2,980 	4,260 
    300.020.0163	W7-18043/A	W7-18043/A	3,310 	4,740 
    300.020.0164	W7-18042/A	W7-18042/A	3,540 	5,060 
    300.020.0165	W1-18009/A	W1-18009/A	1,570 	2,240 
    300.020.0166	W7-18031/A	W7-18031/A	2,330	3,330 
    300.020.0167	W7-18047/A	W7-18047/A	4,210	6,020 
    Code (markup):
    i had import those records to MYSQL database via this query
    LOAD DATA INFILE 'path/file.txt' INTO TABLE your_table
    PHP:
    how i can import to MS SQL database?
     
    Kyriakos, May 15, 2008 IP
  2. apmsolutions

    apmsolutions Peon

    Messages:
    66
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you would want to use BULK INSERT. Google it, and you will see how to use it.
     
    apmsolutions, May 15, 2008 IP