Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Concatinate in a Query

Re: Concatinate in a Query

From: TurkBear <jgreco1_at_mn.rr.com>
Date: Tue, 16 Jul 2002 11:05:30 -0500
Message-ID: <cqg8ju4gfips4mknr0b9nnhkit22g0sjci@4ax.com>

Actually,

Select name,' ',family from ASDF
where id = 1;

works fine..You can always use a literal string as one of the select objects: ( I set the heading off and linesize to 100 to fit it on 1 line) SQL> select empl_nm,' ',office_nm from hr_public where rownum < 5;

Lambert,Ronald Paul                                  Land Management
Hopkins,Ruth E                                       Audit
Coulianos,Theodore T                                 Motor Carrier Services
Clemen,Jacqueline B                                  Financial Management

hth,

"Jim Kennedy" <kennedy-family_at_attbi.com> wrote:

>I think you mean
> select 'select name '|| ' ' ||' family from ASDF' from dual;
>Jim
>
>"Martin Doherty" <martin.doherty_at_oracle.com> wrote in message
>news:3D331277.D149BF6F_at_oracle.comX...
>> You can do it even simpler in one literal string, such as :
>>
>> select 'select name || '' '' || family from ASDF' from dual;
>>
>> Anurag Varma wrote:
>>
>> > You might be looking for something like this?
>> >
>> > select 'select name ||'||''' '''||'||family from ASDF' from dual;
>> >
>> > 'SELECTNAME||'||''''''||'||FAMILYFR
>> > -----------------------------------
>> > select name ||' '||family from ASDF
>> >
>> > .. if not .. then please specify the result you are looking for ...
>> >
>> > Anurag
>> >
>> > "Amin Emami" <amin_emami_at_yahoo.com> wrote in message
>> > news:6f13a27a.0207122133.1b72a0fc_at_posting.google.com...
>> > > hi list,
>> > >
>> > > I've got a question about concatination for Varchar2, in a query. I
>> > > want to do something like this below :
>> > >
>> > > update BlahBlah
>> > > set XQuery = 'select name || ' ' || family from ASDF'
>> > > where id =1 ^^^^^^^^^^
>> > >
>> > > you see, I want to seprate the name and family in my query with a
>> > > blank space, but it cause to terminate the update query.
>> > >
>> > > what can I do to solve my problem ? is there any special character for
>> > > blank space ?
>> > >
>> > > any suggestion is welcome
>> > > best wishes,
>> > >
>> > > Amin Emami
>>
>

-----------== Posted via Newsfeed.Com - Uncensored Usenet News ==----------

   http://www.newsfeed.com The #1 Newsgroup Service in the World! -----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers =----- Received on Tue Jul 16 2002 - 11:05:30 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US