pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedProblem regarding 'select...as...'
3+ messages / 3 participants
[nested] [flat]
* Problem regarding 'select...as...'
@ 2000-06-12 22:32 Bernie Huang <bernie.huang@ec.gc.ca>
2000-06-12 22:40 ` Re: [PHP-DB] Problem regarding 'select...as...' Vince LaMonica <Vince.LaMonica@quest.com>
2000-06-13 05:18 ` Re: Problem regarding 'select...as...' Jesus Aneiros <aneiros@jagua.cfg.sld.cu>
0 siblings, 2 replies; 3+ messages in thread
From: Bernie Huang @ 2000-06-12 22:32 UTC (permalink / raw)
To: PHP Database <php-db@lists.php.net>; pgsql-sql
Hi, I have a following query:
"select equip_attr[1], equip_attr[2]
as year, make
from vehicle_tb;"
which gives me the following error:
"ERROR: Attribute 'make' not found"
Is there something wrong with my "as" usage? Thanks
- Bernie
Attachments:
bernie.huang.vcf (text/x-vcard, 314B) download
begin:vcard
n:Huang;Bernie
tel;fax:(604)664-9195
tel;work:(604)664-9172
x-mozilla-html:TRUE
org:Environment Canada;Standards and Technology Services
adr:;;700-1200 West 73 Ave.;Vancouver;BC;V6P 6H9;Canada
version:2.1
email;internet:bernie.huang@ec.gc.ca
title:Programmer
x-mozilla-cpt:;0
fn:Bernie Huang
end:vcard
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [PHP-DB] Problem regarding 'select...as...'
2000-06-12 22:32 Problem regarding 'select...as...' Bernie Huang <bernie.huang@ec.gc.ca>
@ 2000-06-12 22:40 ` Vince LaMonica <Vince.LaMonica@quest.com>
1 sibling, 0 replies; 3+ messages in thread
From: Vince LaMonica @ 2000-06-12 22:40 UTC (permalink / raw)
To: Bernie Huang <bernie.huang@ec.gc.ca>; +Cc: PHP Database <php-db@lists.php.net>; pgsql-sql
On 2000-06-12, Bernie Huang stated:
} "select equip_attr[1], equip_attr[2]
} as year, make
} from vehicle_tb;"
}
} which gives me the following error:
}
} "ERROR: Attribute 'make' not found"
}
} Is there something wrong with my "as" usage? Thanks
Try:
"select equip_attr[1] as year, equip_attr[2] as make"
instead.
HTH,
/vjl/
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Problem regarding 'select...as...'
2000-06-12 22:32 Problem regarding 'select...as...' Bernie Huang <bernie.huang@ec.gc.ca>
@ 2000-06-13 05:18 ` Jesus Aneiros <aneiros@jagua.cfg.sld.cu>
1 sibling, 0 replies; 3+ messages in thread
From: Jesus Aneiros @ 2000-06-13 05:18 UTC (permalink / raw)
To: Bernie Huang <bernie.huang@ec.gc.ca>; +Cc: pgsql-sql
I think the correct way is
SELECT equipo_attr[1] AS year, equip_attr[2] AS make
FROM vehicle_tb;
On Mon, 12 Jun 2000, Bernie Huang wrote:
> Hi, I have a following query:
>
> "select equip_attr[1], equip_attr[2]
> as year, make
> from vehicle_tb;"
>
> which gives me the following error:
>
> "ERROR: Attribute 'make' not found"
>
> Is there something wrong with my "as" usage? Thanks
>
>
> - Bernie
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2000-06-13 05:18 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-06-12 22:32 Problem regarding 'select...as...' Bernie Huang <bernie.huang@ec.gc.ca>
2000-06-12 22:40 ` Vince LaMonica <Vince.LaMonica@quest.com>
2000-06-13 05:18 ` Jesus Aneiros <aneiros@jagua.cfg.sld.cu>
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