pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedwhy does this query does not work??????
3+ messages / 3 participants
[nested] [flat]
* why does this query does not work??????
@ 2001-11-15 16:18 satya pariki <spariki@yahoo.com>
0 siblings, 2 replies; 3+ messages in thread
From: satya pariki @ 2001-11-15 16:18 UTC (permalink / raw)
To: pgsql-sql
are there any substitution variables in postgresql ?
select * from EMP where EMPNO = &empnum;
it is giving error. it is telling to type cast or use
parenthesis.
i will be grateful if u help me out of this.
bye
satya
__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: why does this query does not work??????
@ 2001-11-19 21:16 Josh Berkus <josh@agliodbs.com>
parent: satya pariki <spariki@yahoo.com>
1 sibling, 0 replies; 3+ messages in thread
From: Josh Berkus @ 2001-11-19 21:16 UTC (permalink / raw)
To: satya pariki <spariki@yahoo.com>; +Cc: pgsql-sql
Satya,
> are there any substitution variables in postgresql ?
>
> select * from EMP where EMPNO = &empnum;
No. If you need to use variables, write a PL/pgSQL function or do the
substitution in your middleware/client language.
-Josh
______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh@agliodbs.com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: why does this query does not work??????
@ 2001-11-19 21:42 Jeff Eckermann <jeff_eckermann@yahoo.com>
parent: satya pariki <spariki@yahoo.com>
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Eckermann @ 2001-11-19 21:42 UTC (permalink / raw)
To: satya pariki <spariki@yahoo.com>; pgsql-sql
If you are using psql (command line client), you can
use:
\set variable_name variable_value
Then refer to the value by ":variable_name", i.e.
colon instead of ampersand.
"man psql" for more information.
--- satya pariki <spariki@yahoo.com> wrote:
> are there any substitution variables in postgresql ?
>
> select * from EMP where EMPNO = &empnum;
>
> it is giving error. it is telling to type cast or
> use
> parenthesis.
>
> i will be grateful if u help me out of this.
>
> bye
> satya
>
> __________________________________________________
> Do You Yahoo!?
> Find the one for you at Yahoo! Personals
> http://personals.yahoo.com
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to
majordomo@postgresql.org
__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2001-11-19 21:42 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-11-15 16:18 why does this query does not work?????? satya pariki <spariki@yahoo.com>
2001-11-19 21:16 ` Josh Berkus <josh@agliodbs.com>
2001-11-19 21:42 ` Jeff Eckermann <jeff_eckermann@yahoo.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