Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stored Procedure For Importing A .csv File Into An MySQL Database

Status
Not open for further replies.

bd022

IS-IT--Management
Jul 27, 2004
1
US
I'm currently developing a .asp front end/ sql back end web site for holding asset information. I've created the table with the data which I want to stick into a table already created in the database. I've wrote stored procedures for everything else and I'd like one for importing this data, it's really only a one off, but if it can be made adaptable for multiple use it'd be a bonus. Can you guys give me any ideas for importing the file which is stored locally but will be on the server onto the database. I've done a test just putting data in and it works fine. But I've really no idea how to get the stored procedure for importing off the ground. The thought was to use a .csv but if there is an easier way.

Much appreciated.

BD
 
Well for sql server you can just do a bulk insert or bcp.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top