473,766 Members | 2,093 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

COPY command error

8 New Member
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 13505
rski
700 Recognized Expert Contributor
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
2112
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 Postgres, have file permissions set to RW-R--R--, and it is located in /tmp (also tried putting it in the Postgres home directory). I am able to use the insert command successfully on the same table, so it's not a db permission problem. Any...
9
3035
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 use the Copy Command when doing a normal right click. I know that in some cases this would be good for someone who wants to make it harder to copy pictures from their site... but in this case I WANT people to be able to copy the pictures....
1
1780
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 -- regards, Deepa K.
2
9736
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
2854
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 COPY. In the case of an extraneous comma or quote, it would identify the offending record. Thanks Bob Powell
4
7042
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 problem is. Version 7.41 is installed... see below for details: A comma delimited text file has been placed in a local directory with permissions set to allow any user to read or write to it: /root/Desktop/server_transfer/WorldPoints_v2.txt'
0
2768
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 COPY command and loop through the copy data using pg_put_line to insert and then pg_end_copy after posting the last line as '\.'. Worked well under that 1500 line area. What I found was if I issue a pg_connection_busy($dbh) before the...
3
1863
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 dos prompt , which is activated thru windows command prompt. pls let me know if there is some other way out.. regs devinath
3
12185
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 need to copy a data from a text file which is in my system to the database in server..
0
9568
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
9959
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9837
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8833
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7381
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5279
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.