pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: String Concatnation
4+ messages / 4 participants
[nested] [flat]
* String Concatnation
@ 2001-02-10 21:03 Najm Hashmi <najm@mondo-live.com>
2001-02-09 20:48 ` Re: String Concatnation Brett W. McCoy <bmccoy@chapelperilous.net>
2001-02-09 21:21 ` Re: String Concatnation Stephan Szabo <sszabo@megazone23.bigpanda.com>
2001-02-09 22:11 ` Re: String Concatnation Jie Liang <jliang@ipinc.com>
0 siblings, 3 replies; 4+ messages in thread
From: Najm Hashmi @ 2001-02-10 21:03 UTC (permalink / raw)
To: pgsql-sql
Hi,
How can I concatnate two varialbles, seperated by a |, that are type text
together?
v, v1 text;
some work
then
res:= v ||''|''|| v1;
this syntex does not work in plpgsql??
Any ideas how to do it ???
Thanks.
Najm
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: String Concatnation
2001-02-10 21:03 String Concatnation Najm Hashmi <najm@mondo-live.com>
@ 2001-02-09 20:48 ` Brett W. McCoy <bmccoy@chapelperilous.net>
2 siblings, 0 replies; 4+ messages in thread
From: Brett W. McCoy @ 2001-02-09 20:48 UTC (permalink / raw)
To: Najm Hashmi <najm@mondo-live.com>; +Cc: pgsql-sql
On Sat, 10 Feb 2001, Najm Hashmi wrote:
> How can I concatnate two varialbles, seperated by a |, that are type text
> together?
> v, v1 text;
> some work
> then
> res:= v ||''|''|| v1;
What error is it giving? Do you need to be using two single quotes in the
statement?
-- Brett
http://www.chapelperilous.net/~bmccoy/
---------------------------------------------------------------------------
There is a certain impertinence in allowing oneself to be burned for an opinion.
-- Anatole France
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: String Concatnation
2001-02-10 21:03 String Concatnation Najm Hashmi <najm@mondo-live.com>
@ 2001-02-09 21:21 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
2 siblings, 0 replies; 4+ messages in thread
From: Stephan Szabo @ 2001-02-09 21:21 UTC (permalink / raw)
To: Najm Hashmi <najm@mondo-live.com>; +Cc: pgsql-sql
I was able to do a function that took two arguments and did
that under 7.1beta3 with no trouble.
What message are you getting?
On Sat, 10 Feb 2001, Najm Hashmi wrote:
> Hi,
> How can I concatnate two varialbles, seperated by a |, that are type text
> together?
> v, v1 text;
> some work
> then
> res:= v ||''|''|| v1;
> this syntex does not work in plpgsql??
> Any ideas how to do it ???
> Thanks.
> Najm
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: String Concatnation
2001-02-10 21:03 String Concatnation Najm Hashmi <najm@mondo-live.com>
@ 2001-02-09 22:11 ` Jie Liang <jliang@ipinc.com>
2 siblings, 0 replies; 4+ messages in thread
From: Jie Liang @ 2001-02-09 22:11 UTC (permalink / raw)
To: Najm Hashmi <najm@mondo-live.com>; +Cc: pgsql-sql
Hi,
You can use every sql function and operator in plpgsql, so
v||''|''||v2 is OK.
however, you cannot do:
declare
v,v2 text;
you should do:
v text;
v2 text;
also you initialize like:
v text:='''';
Jie LIANG
St. Bernard Software
Internet Products Inc.
10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873
jliang@ipinc.com
www.stbernard.com
www.ipinc.com
On Sat, 10 Feb 2001, Najm Hashmi wrote:
> Hi,
> How can I concatnate two varialbles, seperated by a |, that are type text
> together?
> v, v1 text;
> some work
> then
> res:= v ||''|''|| v1;
> this syntex does not work in plpgsql??
> Any ideas how to do it ???
> Thanks.
> Najm
>
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2001-02-10 21:03 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-02-10 21:03 String Concatnation Najm Hashmi <najm@mondo-live.com>
2001-02-09 20:48 ` Brett W. McCoy <bmccoy@chapelperilous.net>
2001-02-09 21:21 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
2001-02-09 22:11 ` Jie Liang <jliang@ipinc.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