[SQL] How to use serial variable to insert into muiti-recrods?

2007-09-06 Thread hu js
run: "CREATE TABLE xxx ( id serial NOT NULL, name character varying ); insert into xxx select default values,place_name from air_bui;" fail: "ERROR: syntax error at or near "default" SQL state: 42601 Character: 24" How can I do? Bill Gates __

Re: [SQL] How to use serial variable to insert into muiti-recrods?

2007-09-06 Thread Ashish Karalkar
I think default is a key word whic u r using as a column name in select statment. With Regards Ashish... - Original Message - From: "hu js" <[EMAIL PROTECTED]> To: Sent: Thursday, September 06, 2007 12:41 PM Subject: [SQL] How to use serial variable to insert into muiti-recrods?

Re: [SQL] How to use serial variable to insert into muiti-recrods?

2007-09-06 Thread Milen A. Radev
hu js написа: > run: > "CREATE TABLE xxx > ( > id serial NOT NULL, > name character varying > ); > insert into xxx select default values,place_name from air_bui;" insert into xxx (name) select place_name from air_bui; > > fail: > "ERROR: syntax error at or near "default" > SQL state: 42601 > Cha

Re: [SQL] How to use serial variable to insert into muiti-recrods?

2007-09-06 Thread Richard Huxton
hu js wrote: > run: > "CREATE TABLE xxx > ( > id serial NOT NULL, > name character varying > ); > insert into xxx select default values,place_name from air_bui;" insert into xxx (name) SELECT place_name FROM ... HTH -- Richard Huxton Archonet Ltd ---(end of broadcast

Re: [SQL] How to use serial variable to insert into muiti-recrods?

2007-09-06 Thread Jean-David Beyer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hu js wrote: > run: > "CREATE TABLE xxx ( id serial NOT NULL, name character varying ); > insert into xxx select default values,place_name from air_bui;" > > fail: "ERROR: syntax error at or near "default" SQL state: 42601 > Character: 24" > > Ho

[SQL] to_date function

2007-09-06 Thread anru chen
Hi all: i am use postgres 8.2 on windows XP, following select statement "select to_date('10 August 2007','DD Month ');" return me 0007-08-10, if i do "select to_date('10 September 2007','DD Month ');" result is correct 2007-09-10 seems like "to_date" function only work correctly for cur

Re: [SQL] to_date function

2007-09-06 Thread A. Kretschmer
am Fri, dem 07.09.2007, um 17:22:30 +1200 mailte anru chen folgendes: > Hi all: > > i am use postgres 8.2 on windows XP, following select statement > > "select to_date('10 August 2007','DD Month ');" > return me 0007-08-10, > > if i do "select to_date('10 September 2007','DD Month ');"

Re: [SQL] to_date function

2007-09-06 Thread Phillip Smith
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of anru chen Sent: Friday, 7 September 2007 15:23 To: pgsql-sql@postgresql.org Subject: [SQL] to_date function > Hi all: > > i am use postgres 8.2 on windows XP, following select statement > > "select to_date('1