Databases are not my thing. I am trying to do a bulk insert so I tried doing it with a query
BULK INSERT dbo.make_model
From 'c:\Database Backup\tempDataLoad.csv'
WITH
(
FIELDTERMINATOR = ' , ',
ROWTERMINATOR = '\n'
)
but I get the response cannot find make_model table. I don't know where I am going wrong any help would be appreciated.
If I could do it in a stored procedure or something. Is there a way of me specifying the database. I tried putting the database before the table name with a dot in front.
it should have worked. If it doesn't, then the table must not exist, or you may be executing in a context that does not have permission to do bulk inserts to it.
-Tab Alleman
Marked as answer by seamus1982 on Sep 20, 2011 08:44 PM
seamus1982
Participant
936 Points
375 Posts
Bulk Insert - Stupid Question but can't find answer
Sep 20, 2011 02:29 PM|LINK
Hi,
Databases are not my thing. I am trying to do a bulk insert so I tried doing it with a query
BULK INSERT dbo.make_model
From 'c:\Database Backup\tempDataLoad.csv'
WITH
(
FIELDTERMINATOR = ' , ',
ROWTERMINATOR = '\n'
)
but I get the response cannot find make_model table. I don't know where I am going wrong any help would be appreciated.
If I could do it in a stored procedure or something. Is there a way of me specifying the database. I tried putting the database before the table name with a dot in front.
TabAlleman
All-Star
15575 Points
2702 Posts
Re: Bulk Insert - Stupid Question but can't find answer
Sep 20, 2011 02:54 PM|LINK
If you're saying you tried:
BULK INSERT databasename.dbo.make_model
From ...
it should have worked. If it doesn't, then the table must not exist, or you may be executing in a context that does not have permission to do bulk inserts to it.
seamus1982
Participant
936 Points
375 Posts
Re: Bulk Insert - Stupid Question but can't find answer
Sep 20, 2011 08:44 PM|LINK
Its something to do with me creating the database in visual studio rather than in management studio.