473,320 Members | 1,947 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

copy from a txt file on a network drive

I am running a SQL Script called from a batch file to build a temp database from a flat file.

It works when the flat is on the C: drive but not on a net work drive
I get this error:

ERROR: could not open file "\\ESSOMAFPS5\Pollbook\Data\STREET_DATA.txt" for reading: Invalid argument

Here is the copy statement... I am using the \\ UNC name in my call

BEGIN;

---------------------------
-- import_STREET_DATA
---------------------------------------------------------------TRUNCATE temp.import_STREET_DATA;

COPY temp.import_STREET_DATA

FROM '\\\\ESSOMAFPS5\\Pollbook\\Data\\STREET_DATA.txt'

WITH DELIMITER E'|'
CSV HEADER
NULL AS '';

-- INSERT LOG
SELECT temp.temp_log('3.0', 'temp.import_STREET_DATA', 'INSERT', 'TRUNCATED AND REFRESHED WITH DATA FROM FILE.');

COMMIT;

I have also tried the /copy command and receive this error

ERROR: syntax error at or near "/"
LINE 1: /COPY temp.import_STREET_DATA
Sep 3 '14 #1
0 1637

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Robert Tarantino | last post by:
Hello, I am trying to find a way to create a scheduled task or service that will copy my local profile folders under "Documents and settings" to a network drive. This would allow me to restore...
2
by: giloosh99 | last post by:
Hello, Im grabbing tables via VB code using visual foxpro ODBC drives. The tables directory is in a mapped network drive. The code works fine and does the job, however if the computer is idle for...
2
by: Paul | last post by:
Dear All, I want to use web form to upload my file and copy the file to another machine. I can upload the file, but when I copy the file(file.CopyTo(".....", true)) to another machine(map...
4
by: Boris | last post by:
I observe the following strange behavior of my application. Let say we have managed application MyApp.exe which depend on a few assemblies MyAssembly1.dll, MyAssembly2.dll and MyAssembly3.dll. The...
2
by: .Net Believer | last post by:
I using the routine below to copy file to a network drive for a regular backup process. Before calling this routine I using another function to check the presence of the LAN connection and the...
2
by: createdbyx | last post by:
I am trying to make a file sync utillity to sync files between my laptop and my desktop pc. On my desktop machine (xp pro sp2) I have shared my "Visual Studio Projects" folder using windows simple...
4
by: visionstate | last post by:
Hi all, I have built my 1st database and it is ready to go on a shared network drive. I have read a few articles about the security in access but am having some trouble getting my head around it...
2
by: Alex | last post by:
I am now working on a project where a requirement is the autogeneration of web service (asmx) files that will be located on a network drive to be shared by multiple load balanced web servers. I am...
2
by: keri | last post by:
Hi, I have a db that has a linked table (excel file). The problem I am having is that the linked table is on a network drive and causing the db to be very slow, plus users are not always on the...
20
by: =?Utf-8?B?QnJpYW4gTmljaG9sc29u?= | last post by:
Hello, I'm trying to create an admin page that can run miscellaneous scripts for our IT department. Currently, I'm trying to create a script that can map a network drive for a user (e.g. a form...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.