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

Import Data in SQL server!!!??

Status
Not open for further replies.

IPconfig

Technical User
Jun 9, 2001
41
UG

hello ppl

well i my query is ..i want to import a file into a table , i have had a look through the manual and i have seen i can use bcp to import/export data so this is what i have done

my current syntax is like this

[snip]

bcp EZACCESS_DB.dbo.AUTHENTICATION in c:\program files\ASP International\EZ ACCE$$ 3\batches\BATCH_49.txt /c /U <user_name> /P

[/snip]

i get this error:

Msg 170, Level 15, State 1, Server UNDER-DOG, Procedure , Line 1
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near
'.'.

is this a syntax error on the &quot;bcp&quot; syntax or is it an error in the BATCH_49.txt that i am trying to export

all help is highly appreciated...!!


 
Why not use SQL Enterprise Manager to import the data using an ODBC driver for text as the source ... I use it all the time ...


good luck


 

well i have tried that ..i.e

i want to replace some info in a table with some new info that i had generated of the production server , see there is a program that picks it's info from the sql db now i wanted to edit the table by exporting the info that i had changed and putting it in the table so that the program that depends on sql server can pick it up. so this is what i did while in the Enterprise manager

right clicked on the table and then choose import then the DTS wizard came up and my source was text where i specified where my info is and the destination was the db that i wanted and i was using ODBC driver for SQL Server ( i am not sure if that was the righ choice) well i continued with a couple more questions then i was done , after re-loading sql server i noticed that it had created a table for the file i had just imported which i deffinately did not want i wanted it to be added to an already existing table. I hope you get a picture of what i am saying here ,

so how can i get file that i am exporting appened into the already existing table without creating another table??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top