Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Import csv file.

Author  Topic 

ertweety
Starting Member

15 Posts

Posted - 2012-03-22 : 12:51:45
Hi All, I'm new to this forum but hoping someone can help solve a problem I'm having. I'm trying to import a csv file into a new table I created. Here's the code I'm using..

BULK
INSERT DISPTACHES_2011
FROM 'G:\ConsumerReasearch_2011.csv'
WITH
( FIRSTROW = 2,
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n')

The error I get when I run the code is ORA-00900 'invalid SQL statement'. I'm not sure what I'm doing wrong. Please help.

X002548
Not Just a Number

15586 Posts

Posted - 2012-03-22 : 13:32:18
Maybe fully qualify the table? Otherwise it looks OK. Who's G Drive is that? There server or yours? Where are you executing this from?

http://msdn.microsoft.com/en-us/library/ms188365.aspx



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-03-22 : 13:44:55
quote:
The error I get when I run the code is ORA-00900 'invalid SQL statement'. I'm not sure what I'm doing wrong. Please help.
That error message looks like it came from an Oracle database. Oracle experts on this forum are far and few in between.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2012-03-22 : 14:00:36
quote:
Originally posted by sunitabeck

quote:
The error I get when I run the code is ORA-00900 'invalid SQL statement'. I'm not sure what I'm doing wrong. Please help.
That error message looks like it came from an Oracle database. Oracle experts on this forum are far and few in between.



D'oh

There's that having to read thing again..good catch



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page
   

- Advertisement -