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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

osql utility

Status
Not open for further replies.

bschmitz

Programmer
Apr 16, 2002
17
US
Can anyone point me in a direction as to how to import data from either a text file or a spreadsheet into an existing SQL table using the osql utility. Thanks in advance!
 
use DTS to import / export the data from other source to SQL..

hope this helps,,,
 
To import files use DTS, the BCP utility or the BULK INSERT command. You can execute the BULK INSERT command using OSQL. However, BULK INSERT (and BCP) will only import text files not spreadsheets. To import spreadsheets, you must use DTS or export from Excel to a flat file and then import the flat file.

I agree with nowayout that DTS is the best option.

If you want to get the best answer for your question read faq183-874 and faq183-3179.
Terry L. Broadbent - DBA
SQL Server Page:
 
Thanks nowayout,tbroadbent.
I created the DTS in my EM. Copied it to the server where I needed to run it. Ran it from the command prompt. Worked like a fullback draw on a prevent defense.
 
per my last reply - I was wrong. I could not create the package because SQL could not recognize the servername of the server where I need to run the package, as they are not connected. I will continue to research.
 
I was able to make it work using the Microsoft Data Link. Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top