Lists: | pgsql-general |
---|
From: | Andrew Toth <tothaa(at)chello(dot)hu> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | beginne' - inserting a record |
Date: | 2005-12-03 20:48:42 |
Message-ID: | 1133642923.9402.20.camel@edvac4 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
Dear List,
I have managed some small databases with FoxPro, but something is not
known by me to manage postgresql databases :(
I had created a database as 'postgres' user and I tried the following
as 'postgres' user too under Debian SID with postgresql 8.1:
(it seems to be a Hungarian version :-) - FoxPro couldn't speak
Hungarian)
# psql MediaBin
[...]
MediaBin=# \d media
Tábla "public.media"
Oszlop | Típus | Módosító
----------+--------------+----------
type | character(3) |
capacity | smallint |
mid | character(5) |
MediaBin=# insert into media values ("000", 120, "00001");
ERROR: column "000" does not exist
MediaBin=#
What the Hell could be wrong?
--
Tisztelettel: / Grüße / Yours faitfully,
Andrew Toth
From: | Peter Wiersig <peter(at)friesenpeter(dot)de> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: beginne' - inserting a record |
Date: | 2005-12-03 20:51:03 |
Message-ID: | 20051203205103.GA31232@london087.server4you.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
On Sat, Dec 03, 2005 at 09:48:42PM +0100, Andrew Toth wrote:
>
> MediaBin=# insert into media values ("000", 120, "00001");
> ERROR: column "000" does not exist
>
> What the Hell could be wrong?
Your quotes. Use ' and that command will work.
Peter
From: | Terry Lee Tucker <terry(at)esc1(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: beginne' - inserting a record |
Date: | 2005-12-03 20:55:36 |
Message-ID: | 200512031555.36559.terry@esc1.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
I'm not familiar with version 8.1; however, you to use single quotes, not
double quotes as in:
INSERT INTO media VALUES ('000', 120, '00001');
That should work...
On Saturday 03 December 2005 03:48 pm, Andrew Toth saith:
> Dear List,
>
> I have managed some small databases with FoxPro, but something is not
> known by me to manage postgresql databases :(
>
> I had created a database as 'postgres' user and I tried the following
> as 'postgres' user too under Debian SID with postgresql 8.1:
> (it seems to be a Hungarian version :-) - FoxPro couldn't speak
> Hungarian)
>
> # psql MediaBin
> [...]
> MediaBin=# \d media
> Tábla "public.media"
> Oszlop | Típus | Módosító
> ----------+--------------+----------
> type | character(3) |
> capacity | smallint |
> mid | character(5) |
>
> MediaBin=# insert into media values ("000", 120, "00001");
> ERROR: column "000" does not exist
>
> MediaBin=#
>
>
> What the Hell could be wrong?
>
>
>
>
>
>
>
> --
>
> Tisztelettel: / Grüße / Yours faitfully,
> Andrew Toth
From: | "Raymond O'Donnell" <rod(at)iol(dot)ie> |
---|---|
To: | Andrew Toth <tothaa(at)chello(dot)hu>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: beginne' - inserting a record |
Date: | 2005-12-03 20:59:13 |
Message-ID: | 43920721.18519.1CC02A2@localhost |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
On 3 Dec 2005 at 21:48, Andrew Toth wrote:
> MediaBin=# insert into media values ("000", 120, "00001");
> ERROR: column "000" does not exist
I think you should use single-quotes rather than doubles:
insert into media values ('000', 120, '00001');
--Ray.
-------------------------------------------------------------
Raymond O'Donnell http://www.galwaycathedral.org/recitals
rod(at)iol(dot)ie Galway Cathedral Recitals
-------------------------------------------------------------
From: | Andrew Toth <tothaa(at)chello(dot)hu> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: beginne' - inserting a record |
Date: | 2005-12-03 21:09:01 |
Message-ID: | 1133644141.9402.26.camel@edvac4 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
thx,
it's working!
And the last question - today:
how can i change the orter of the fields in a table?
2005-12-03, szo keltezéssel 20.59-kor Raymond O'Donnell ezt írta:
> On 3 Dec 2005 at 21:48, Andrew Toth wrote:
>
> > MediaBin=# insert into media values ("000", 120, "00001");
> > ERROR: column "000" does not exist
>
> I think you should use single-quotes rather than doubles:
>
> insert into media values ('000', 120, '00001');
>
> --Ray.
>
> -------------------------------------------------------------
> Raymond O'Donnell http://www.galwaycathedral.org/recitals
> rod(at)iol(dot)ie Galway Cathedral Recitals
> -------------------------------------------------------------
>
--
Tisztelettel: / Grüße / Yours sincerely,
Andrew Toth
From: | Andreas Kretschmer <akretschmer(at)spamfence(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: beginne' - inserting a record |
Date: | 2005-12-03 21:21:09 |
Message-ID: | 20051203212109.GA5134@kaufbach.delug.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
Andrew Toth <tothaa(at)chello(dot)hu> schrieb:
> thx,
>
> it's working!
>
> And the last question - today:
>
> how can i change the orter of the fields in a table?
If you have a table with field1, field2, field3, and you want to see
this table as field3, field2, field1, simple do 'select field3, field2,
field1 from table'.
Btw.: TOFU (top posting with fullquote below) are silly.
HTH, Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°
From: | Rodrigo Gonzalez <rjgonzale(at)gmail(dot)com> |
---|---|
To: | tothaa(at)freestart(dot)hu |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: beginne' - inserting a record |
Date: | 2005-12-03 22:38:20 |
Message-ID: | 43921E5C.9050101@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general |
dont use " user '
Andrew Toth wrote:
>
> Dear List,
>
> I have managed some small databases with FoxPro, but something is not
> known by me to manage postgresql databases :(
>
> I had created a database as 'postgres' user and I tried the following
> as 'postgres' user too under Debian SID with postgresql 8.1:
> (it seems to be a Hungarian version :-) - FoxPro couldn't speak
> Hungarian)
>
> # psql MediaBin
> [...]
> MediaBin=# \d media
> Tábla "public.media"
> Oszlop | Típus | Módosító
> ----------+--------------+----------
> type | character(3) |
> capacity | smallint |
> mid | character(5) |
>
> MediaBin=# insert into media values ("000", 120, "00001");
> ERROR: column "000" does not exist
>
> MediaBin=#
>
>
> What the Hell could be wrong?
>
>
>
>
>
>
>
> /--/
>
> /Tisztelettel: / Grüße / Yours /faitfully,
> Andrew Toth
>