|
-
Jul 20th, 2005, 08:32 AM
#1
Thread Starter
Hyperactive Member
Oracle CONCAT
Is there a way to concatenate ore than two strings together using an ORACLE CONCAT statement. I don't want to have to resort to the following:-
Code:
CONCAT(CONCAT('A','B'),'C')
....as I've got four rows from a table that I need to concat together....
Is there another way? I am unable to use a function as the DB techincaly belongs to another company and we're not allowed to add/alter the schema.
Basically, the table I'm interested in contains addresses, the columns are ADDRESS1,ADDRESS2,ADDRESS3,ADDRESS4 and POSTCODE. I want to concat these using commas to separate them.
TIA
"I'm Brian and so is my Wife"
-
Jul 20th, 2005, 10:06 AM
#2
Re: Oracle CONCAT
use the double pipe :
Code:
table.field || table.field2 || table.field3
I though concat used more that two parts?
Code:
concat(table.field,table.field2,table.field3)
Might be wrong on that.
Post up if neither work
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
Jul 20th, 2005, 10:34 AM
#3
Frenzied Member
Re: Oracle CONCAT
I just spent a little time in my SQL Server book, and couldn't find CONCAT
Is that Oracle specific?
If so, is there an SQL Server equivalent?
Beantown Boy
Please use [highlight=vb]your code goes in here[/highlight] tags when posting code.
When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
-
Jul 20th, 2005, 03:13 PM
#4
Addicted Member
-
Jul 20th, 2005, 07:58 PM
#5
Re: Oracle CONCAT
 Originally Posted by SeanK
I just spent a little time in my SQL Server book, and couldn't find CONCAT
Is that Oracle specific?
If so, is there an SQL Server equivalent?
Yeah it is... but if its SQL Server you want.. use +
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|