Note: "DELEMITER" should be "DELIMITER".
On Thu, Apr 18, 2013 at 1:34 AM, basti wrote:
> I have fixed it with dollar-quoting.
>
> Original-Nachricht Betreff: [SQL] copy from csv,
> variable filename within a function Datum: Thu, 18 Apr 2013 09:26:09
> +0200 Von: bastiA
Hi,
For what it's worth, WindowsXP (at least) seems to currently support
forward slashes at the OS level, so this Postgres behavior isn't as odd
as it might seem. If you enclose your paths with double quote (")
marks, Windows will even accept Unix style paths for some instructions
on the comm
Paul Lambert wrote:
Phillip Smith wrote:
"Having said that, if I switch it to a forward slash it works without
error... odd, given that weenblows standard is backslash."
Yes, but PostgreSQL uses a back-slash as an escape character, which
needs to
be used to escape itself at an application lev
Phillip Smith wrote:
"Having said that, if I switch it to a forward slash it works without
error... odd, given that weenblows standard is backslash."
Yes, but PostgreSQL uses a back-slash as an escape character, which needs to
be used to escape itself at an application level before the O/S gets
al
with it :)
-p
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Paul Lambert
Sent: Monday, 12 February 2007 11:09
To: Joe
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] COPY FROM query.
Joe wrote:
> Hi Paul,
>
> On Mon, 2007-02-12 at 08:19 +0900,
Joe wrote:
Hi Paul,
On Mon, 2007-02-12 at 08:19 +0900, Paul Lambert wrote:
I'm attempting to copy from a table into a file using a select query
inside the copy.
The following is my command:
COPY (SELECT DISTINCT ON (dealer_id,appraisal_id) * FROM
appraisals_temp) TO 'c:\autodrs_appraisal_ne
Hi Paul,
On Mon, 2007-02-12 at 08:19 +0900, Paul Lambert wrote:
> I'm attempting to copy from a table into a file using a select query
> inside the copy.
>
> The following is my command:
>
> COPY (SELECT DISTINCT ON (dealer_id,appraisal_id) * FROM
> appraisals_temp) TO 'c:\autodrs_appraisal_ne
An INSERT INTO will fix my problem with needing the extra copy from and
copy to.
I'm still curious as to why i was being told I couldn't specify a
relative path though.
P.
--
Paul Lambert
Database Administrator
AutoLedgers
---(end of broadcast)--
That works like a charm. Thanks, Alvaro!
-Jeff
-Original Message-
From: Alvaro Herrera [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 08, 2007 1:22 PM
To: Demel, Jeff
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] COPY FROM - force a value
Demel, Jeff wrote:
> Is there a way
Demel, Jeff wrote:
> Is there a way to force a value when you're doing a COPY FROM, importing
> a file into a table?
>
> Here's my query as it is now:
>
> COPY filetable (value1, value2, value3, value4, forcevalue1,
> forcevalue2)
> FROM 'C:\\InsertFiles\\thisfile.txt'
> WITH DELIMITER AS ' '
On 11/21/06, Steve Midgley <[EMAIL PROTECTED]> wrote:
Hello,
(I already fear the answer to my question is "no..") :)
I am using the 'COPY FROM' SQL command (not psql \copy) to move data
into a table from a CSV file. The source data are suitable for import
EXCEPT there are extraneous columns of
On 10/20/2004 6:03 PM, Gifford Hesketh wrote:
Am I forgetting some limitation ? I get "ERROR: syntax error at or
near "$1" at character 22" with this:
CREATE FUNCTION public.fn_b_import( text ) RETURNS void AS
'
COPY b_import FROM $1 ;
'
LANGUAGE 'sql' STABLE;
Utility statements don't accept par
copy that table out .
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Christoph Haller
Sent: 27 February 2003 12:45
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [SQL] Copy from a SELECT
>
> I know that the COPY command requires that you work with pl
Kenneth Evans writes:
> On the other hand the COPY FROM file command has it the other way round - if the
>separators are semi-colons then the source file
> London;12;15.7
> Paris;13;22.2
> will work
>
> but
> 'London'; '12'; '15.7'
> 'Paris';'13';'22.2'
> will not!
The COPY input data is a separ
On Tue, 15 Aug 2000, Adam Lang wrote:
> Gotcha. Now, if I do an insert and just don't specify that field at all, it
> will, use the default value, correct? As long as I don't "touch" the field
> with anything it uses the default.
Right, as long as you don't specify the field in the column lis
Sort of. You can give the field a default value of
nextval() which means that if you do not specify
the column in an insert, it automatically gets the default
value which should be the next value in the sequence.
Note, that not putting the column is different from inserting a
NULL into the field
Well, if you define your main table to have a serial, or an explicit
default nextval(seqid), you won't even need to do that. Just leave
the column off the insert list and the default should fill it for you.
Stephan Szabo
[EMAIL PROTECTED]
On Tue, 15 Aug 2000, Adam Lang wrote:
> I get it. I up
-
From: "Stephan Szabo" <[EMAIL PROTECTED]>
To: "Adam Lang" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, August 15, 2000 2:00 PM
Subject: Re: [SQL] copy from
>
> Sort of. You can give the field a default value of
> nextval() w
sage -
From: "Stephan Szabo" <[EMAIL PROTECTED]>
To: "Adam Lang" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, August 15, 2000 12:34 PM
Subject: Re: [SQL] copy from
> Well, if you define your main table to have a serial, or an explicit
ot;Adam Lang" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, August 14, 2000 5:17 PM
Subject: Re: [SQL] copy from
>
> One way would be to copy the data into a temporary table that doesn't
> have the id field, and then
> insert into table (fields) select * from
20 matches
Mail list logo