Re: [Q] String Concatination
Posted in 1998
Richard
Try this:
CREATE TEMP TABLE t1
(t_c1 CHAR(9),
t_c2 CHAR(1)));
INSERT INTO t1
SELECT TRIM(name_first) || ',' || TRIM(name_last), "1"
FROM ...; SELECT TRIM(t_c1) || t_c2
FROM t1;
instead of
SELECT (name_first || ',' || name_last) || '1'
HTH
Sujit Pal
______________________________ Reply Separator _________________________________
Subject: [Q] String Concatination
Author: Richard Hurt <rhurt@mercury.thepoint.net> at internet
Date: 6/12/98 12:06 PM
I am tring to build a query that returns a char (10) with some data
attatched to the end.
SELECT (name_first || ',' || name_last) || '1'
name_first name_last
--------------- -----------------
ROBERT SMITH
BOB HURT
JIMMY SMITHSON
JO JO
My result set should be:
ROBERT,SM1
BOB,HURT 1
JIMMY,SMI1
JO,JO 1
I tried to assign it to an alias and then use TEMP[1,9] || '1' but it
would not allow my to treat the alias as a regular string.
Does anyone have any ideas?
Thanx,
Richard Hurt richard.hurt@tricon-yum.com
Systems Analyst rhurt@thepoint.net