Home » SQL & PL/SQL » SQL & PL/SQL » Problem in concectnation?
Problem in concectnation? [message #298086] Tue, 05 February 2008 00:06 Go to next message
tondapi
Messages: 99
Registered: August 2007
Location: usa
Member
Hi

I have city,state,Name data in different tables.I want concate the three tables in this formate city/state/Name.I now we use concect function but i want to place "/" symbole.How any one can help me.
Re: Problem in concectnation? [message #298091 is a reply to message #298086] Tue, 05 February 2008 00:22 Go to previous messageGo to next message
mshrkshl
Messages: 247
Registered: September 2006
Location: New Delhi
Senior Member
select table1.city||'/'||table2.state||'/'||
table3.name from table1,table2,table3
where table1.___=table2._____
and table2.___=table3._____


regards,
Re: Problem in concectnation? [message #298284 is a reply to message #298086] Tue, 05 February 2008 10:11 Go to previous messageGo to next message
joy_division
Messages: 4640
Registered: February 2005
Location: East Coast USA
Senior Member
tondapi wrote on Tue, 05 February 2008 01:06
Hi

I have city,state,Name data in different tables.I want concate the three tables in this formate city/state/Name.I now we use concect function but i want to place "/" symbole.How any one can help me.


I don't know, maybe I'm the only one who sees the humor in this message. Three different (and all incorrect) spellings of the word concatenate.
Re: Problem in concatenation? [message #298417 is a reply to message #298086] Wed, 06 February 2008 01:36 Go to previous message
rajavu1
Messages: 1574
Registered: May 2005
Location: Bangalore , India
Senior Member

You can also use CONCAT function as you mentioned even for '/'


SQL> SELECT CONCAT(CONCAT('A','/'),'B') CON FROM DUAL;

CON
---
A/B

SQL>


But most of programmer prefers to use '||' instead ..

Thumbs Up
Rajuvan
Previous Topic: Max space I can use in my Schema
Next Topic: getting error in UNIX
Goto Forum:
  


Current Time: Sat Dec 03 20:36:02 CST 2016

Total time taken to generate the page: 0.08241 seconds