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
 Other SQL Server 2008 Topics
 Bulk Insert

Author  Topic 

Villanuev
Constraint Violating Yak Guru

478 Posts

Posted - 2011-10-17 : 04:27:38
Guys

Your thoughs.
is there any particular drive/folder to stored the text/csv/excel that the bulk insert will be reading?

Regards,

JOV

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-10-17 : 04:29:11
you can store it anywhere on shared server provided account executing BULKINSERT has access to it for reading the files

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

Villanuev
Constraint Violating Yak Guru

478 Posts

Posted - 2011-10-17 : 20:25:51
Hi Visakh16,


what about in my local drive?
its applicable to read and store my file?
or it should be in the server side?


EXAMPLE. c:\myfile\planning\VP309123

Bulk Insert #VPTable
FROM 'c:\myfile\planning\VP309123.csv'
With
(
DATAFILETYPE = 'char',
FieldTerminator = ',',
CODEPAGE = 'OEM',
KEEPNULLS,
RowTerminator = '\n', FirstRow = 1)



Regards,

jov
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-10-18 : 00:39:12
you can store it in your local drive if its in same domain and job is able to access it from server using account under which its running. also path should be specified in UNC format like
\\yourmachinename\myfile\planning\VP309123.csv and not as absolute path c:\...


------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-10-18 : 00:56:52
I moved the topic out of the Script Library forum. Script Library is for working scripts only.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -