473,396 Members | 1,933 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,396 software developers and data experts.

COPY command error

8
I used the copy command as stateed below, to copy a file containing data, which I want to load into my evaluations table. I get the following error, can some one explain to me what I may be doing wrong.

COPY evaluations FROM 'c:\evaluations.txt'
DELIMITERS ':';


WARNING: nonstandard use of escape in a string literal
LINE 1: COPY evaluations FROM 'c:\evaluations.txt'
^
HINT: Use the escape string syntax for escapes, e.g., E'\r\n'.

ERROR: could not open file "c:evaluations.txt" for reading: No such file or directory
SQL state: 58P01
Dec 25 '07 #1
1 13461
rski
700 Expert 512MB
I used the copy command as stateed below, to copy a file containing data, which I want to load into my evaluations table. I get the following error, can some one explain to me what I may be doing wrong.

COPY evaluations FROM 'c:\evaluations.txt'
DELIMITERS ':';


WARNING: nonstandard use of escape in a string literal
LINE 1: COPY evaluations FROM 'c:\evaluations.txt'
^
HINT: Use the escape string syntax for escapes, e.g., E'\r\n'.

ERROR: could not open file "c:evaluations.txt" for reading: No such file or directory
SQL state: 58P01
See here
http://www.postgresql.org/docs/8.2/i.../sql-copy.html
where the filename option is described
Jan 8 '08 #2

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

Similar topics

0
by: cbb | last post by:
I'm using ver. 7.4.6.1 from a generic install of Fedora Core 3. I always get "permission denied" error when using the COPY command to load to a table from a text file. I'm logged on to the db as...
9
by: Sarah | last post by:
Hi! I have perhaps a strange question... I have a javascript that activates on a right click and shows the user a little menu of links. However, by doing so, it disables the users ability to...
1
by: Deepa K | last post by:
Hi All, Is it possible to insert n rows with 1 or 2 invalid rows using copy command. I used it, it rollbacks everything even if 1 row gets an error. Is their any other way to do it. TIA --...
2
by: Don Isgitt | last post by:
Hi, I am recreating a database and its applications onto a new server and new software; old version of pg was 7.2.4 and new version is gds2=# select version(); version ...
1
by: Bob Powell | last post by:
To whom it may concern: Does anyone know if it is possible to make the COPY command in postgres verbose. It would be very helpful if an error would generate when something goes wrong with a...
4
by: Jon Asher | last post by:
Hi, I'm trying to do a simple import of a comma delimited text file with COPY but it's returning an error. The file has been granted all permissions in Linux, so it's not clear to me what the...
0
by: Robert Fitzpatrick | last post by:
I have a PHP script that was having problems using the COPY command with files around 1500 lines in size. The script will build the copy data from incoming CSV file into a temp file, then start a...
3
by: devinath | last post by:
I came across a problem while running the system file. When the copy command is run using system command , it doesn’t copy files which have size of 0kb. But the same command works if run thru the...
3
priyan
by: priyan | last post by:
hai everybody, I need to copy data from a text file to a table i used copy command like this copy city from 'e\ccccc.txt' with delimiter as ',' it worked successfully. But now i...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.