pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedProblem with Attribute.
4+ messages / 4 participants
[nested] [flat]
* Problem with Attribute.
@ 2003-05-06 09:17 Rado Petrik <r.p@szm.sk>
2003-05-06 09:50 ` Re: Problem with Attribute. Popeanga Marian <pmarian@cnlo.ro>
2003-05-06 09:55 ` Re: Problem with Attribute. Victor Yegorov <viy@nordlb.lv>
2003-05-06 15:01 ` Re: Problem with Attribute. Achilleus Mantzios <achill@matrix.gatewaynet.com>
0 siblings, 3 replies; 4+ messages in thread
From: Rado Petrik @ 2003-05-06 09:17 UTC (permalink / raw)
To: pgsql-sql
Hi ,
I have table picture_path.
1. Step one. Write query to psql.
power2=# select * from picture_path ;
retur:
id_path | p_path | count
---------+--------+--------
(0 rows)
2. Step two. Write query.
power2=# select count from picture_path;
return:
ERROR: Attribute 'count' not found
power2=#
Why ?
This is dump table picture_path.
CREATE TABLE "picture_path" (
"id_path" int4 DEFAULT nextval('"picture_path_id_path_seq"'::text)
NOT NULL,
"p_path" varchar(20) NOT NULL,
"count " int2 NOT NULL
);
Thanks.
-
Rado Petrik <r.p@szm.sk>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Problem with Attribute.
2003-05-06 09:17 Problem with Attribute. Rado Petrik <r.p@szm.sk>
@ 2003-05-06 09:50 ` Popeanga Marian <pmarian@cnlo.ro>
2 siblings, 0 replies; 4+ messages in thread
From: Popeanga Marian @ 2003-05-06 09:50 UTC (permalink / raw)
To: Rado Petrik <r.p@szm.sk>; +Cc: pgsql-sql
\d picture_path in pgsql what returns ?
Rado Petrik wrote:
>Hi ,
>
>I have table picture_path.
>
>
>1. Step one. Write query to psql.
>
>
>power2=# select * from picture_path ;
>
>retur:
>
> id_path | p_path | count
>---------+--------+--------
>(0 rows)
>
>
>2. Step two. Write query.
>
>power2=# select count from picture_path;
>
>return:
>
>ERROR: Attribute 'count' not found
>power2=#
>
>Why ?
>
>
>This is dump table picture_path.
>
>CREATE TABLE "picture_path" (
> "id_path" int4 DEFAULT nextval('"picture_path_id_path_seq"'::text)
>NOT NULL,
> "p_path" varchar(20) NOT NULL,
> "count " int2 NOT NULL
>);
>
>
>Thanks.
>-
>Rado Petrik <r.p@szm.sk>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
>subscribe-nomail command to majordomo@postgresql.org so that your
>message can get through to the mailing list cleanly
>
>
>
--
Popeanga Marian
DBA Oracle
CNLO Romania
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Problem with Attribute.
2003-05-06 09:17 Problem with Attribute. Rado Petrik <r.p@szm.sk>
@ 2003-05-06 09:55 ` Victor Yegorov <viy@nordlb.lv>
2 siblings, 0 replies; 4+ messages in thread
From: Victor Yegorov @ 2003-05-06 09:55 UTC (permalink / raw)
To: Rado Petrik <r.p@szm.sk>; +Cc: pgsql-sql
* Rado Petrik <r.p@szm.sk> [06.05.2003 12:54]:
> power2=# select count from picture_path;
>
> return:
>
> ERROR: Attribute 'count' not found
> power2=#
>
> Why ?
count() is a function.
so:
select count(*) from picture_path;
--
Victor Yegorov
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Problem with Attribute.
2003-05-06 09:17 Problem with Attribute. Rado Petrik <r.p@szm.sk>
@ 2003-05-06 15:01 ` Achilleus Mantzios <achill@matrix.gatewaynet.com>
2 siblings, 0 replies; 4+ messages in thread
From: Achilleus Mantzios @ 2003-05-06 15:01 UTC (permalink / raw)
To: Rado Petrik <r.p@szm.sk>; +Cc: pgsql-sql
On 6 May 2003, Rado Petrik wrote:
> Hi ,
>
> I have table picture_path.
>
>
> 1. Step one. Write query to psql.
>
>
> power2=# select * from picture_path ;
>
> retur:
>
> id_path | p_path | count
> ---------+--------+--------
> (0 rows)
>
>
> 2. Step two. Write query.
>
> power2=# select count from picture_path;
>
> return:
>
> ERROR: Attribute 'count' not found
> power2=#
>
> Why ?
maybe you need
select "count " from picture_path;
>
>
> This is dump table picture_path.
>
> CREATE TABLE "picture_path" (
> "id_path" int4 DEFAULT nextval('"picture_path_id_path_seq"'::text)
> NOT NULL,
> "p_path" varchar(20) NOT NULL,
> "count " int2 NOT NULL
> );
>
>
> Thanks.
> -
> Rado Petrik <r.p@szm.sk>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>
--
==================================================================
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
Nikis 4, Glyfada
Athens 16610
Greece
tel: +30-210-8981112
fax: +30-210-8981877
email: achill@matrix.gatewaynet.com
mantzios@softlab.ece.ntua.gr
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2003-05-06 15:01 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-05-06 09:17 Problem with Attribute. Rado Petrik <r.p@szm.sk>
2003-05-06 09:50 ` Popeanga Marian <pmarian@cnlo.ro>
2003-05-06 09:55 ` Victor Yegorov <viy@nordlb.lv>
2003-05-06 15:01 ` Achilleus Mantzios <achill@matrix.gatewaynet.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox