Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Hi help needed ANSI standard concatenation

Author  Topic 

sponguru_dba
Yak Posting Veteran

93 Posts

Posted - 2005-12-16 : 09:10:53
Hi all

Is theire any ANSI standard concatenation

i mean ANSI standard SQL statement

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-12-16 : 09:13:32
In SQL Server you can concatenate columns by

Select col1+','+col2 from yourTable

provided both are of varchar datatype otherwise you need to convert them to varchar

Is this you are asking for?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

sponguru_dba
Yak Posting Veteran

93 Posts

Posted - 2005-12-17 : 04:04:16
Thanks Madhivanan
But i need query which is eligible work on both ms-sql server and Oracle



Thanks in Advance
sree
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-12-19 : 00:10:06
In Oracle I think there is function called Concat

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

sponguru_dba
Yak Posting Veteran

93 Posts

Posted - 2005-12-19 : 03:29:20
quote:
Originally posted by madhivanan

In Oracle I think there is function called Concat

Madhivanan

Failing to plan is Planning to fail



Yaa Madhavan oracle having concat and || for concatenate
but is it possible with out using '+' in sql server
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-12-19 : 03:53:14
No. You need to use +

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -