dbTalk Databases Forums  

concat

comp.databases.sybase comp.databases.sybase


Discuss concat in the comp.databases.sybase forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Nicolas Mainczyk
 
Posts: n/a

Default concat - 07-06-2004 , 09:56 AM






Hi,

What is the equivalent for CONCAT() syntax in sybase ?

TIA,
Nicky.



Reply With Quote
  #2  
Old   
Mark A. Parsons
 
Posts: n/a

Default Re: concat - 07-06-2004 , 11:55 AM






Nicolas Mainczyk wrote:
Quote:
Hi,

What is the equivalent for CONCAT() syntax in sybase ?
The plus sign (+), eg:

'This is the equival'+'ent of concatenation.'

--
Mark A. Parsons

Iron Horse, Inc.
iron_horse (AT) NOSPAM (DOT) compuserve.com


Reply With Quote
  #3  
Old   
Bret Halford
 
Posts: n/a

Default Re: concat - 07-06-2004 , 04:58 PM



"Nicolas Mainczyk" <nmainczyk (AT) hotmail (DOT) com> wrote

Quote:
Hi,

What is the equivalent for CONCAT() syntax in sybase ?

TIA,
Nicky.

We really can't answer that unless you describe what it
is that this "CONCAT()" syntax does in the first place.

If you are looking to concatenate two char or varchar
values, you can use the "+" operator:

select "abc" + "def"
go

-bret


Reply With Quote
  #4  
Old   
Nicolas Mainczyk
 
Posts: n/a

Default Re: concat - 07-07-2004 , 03:31 AM



I would like to concatenate an INT + VARCHAR.
When I use '+' he tells me to use convert function because he can't convert
CHAR to INT implicitely..
What is the syntax then ?

TIA
Nicky.


"Bret Halford" <bret (AT) sybase (DOT) com> a écrit dans le message news:
34c88f2b.0407061358.5ee149b7 (AT) po...OT) google.com...
Quote:
"Nicolas Mainczyk" <nmainczyk (AT) hotmail (DOT) com> wrote

Hi,

What is the equivalent for CONCAT() syntax in sybase ?

TIA,
Nicky.


We really can't answer that unless you describe what it
is that this "CONCAT()" syntax does in the first place.

If you are looking to concatenate two char or varchar
values, you can use the "+" operator:

select "abc" + "def"
go

-bret



Reply With Quote
  #5  
Old   
Rob Verschoor
 
Posts: n/a

Default Re: concat - 07-07-2004 , 04:51 AM



"Nicolas Mainczyk" <nmainczyk (AT) hotmail (DOT) com> wrote

Quote:
I would like to concatenate an INT + VARCHAR.
When I use '+' he tells me to use convert function because he can't
convert
CHAR to INT implicitely..
What is the syntax then ?

TIA
Nicky.


Just use the convert function as the message says:

convert(varchar, your_int_column)


HTH,

Rob
-------------------------------------------------------------
Rob Verschoor

Certified Sybase Professional DBA for ASE 12.5/12.0/11.5/11.0
and Replication Server 12.5

Author of various Sybase books. New book (coming soon): "The
Complete Sybase Replication Server Quick Reference Guide"
Online orders accepted at http://www.sypron.nl/shop

mailto:rob (AT) YOUR (DOT) SPAM.sypron.nl.NOT.FOR.ME
http://www.sypron.nl
Sypron B.V., P.O.Box 10695, 2501HR Den Haag, The Netherlands
-------------------------------------------------------------




Reply With Quote
  #6  
Old   
Michael Peppler
 
Posts: n/a

Default Re: concat - 07-07-2004 , 06:33 AM



On Wed, 07 Jul 2004 10:31:41 +0200, Nicolas Mainczyk wrote:

Quote:
I would like to concatenate an INT + VARCHAR. When I use '+' he tells me
to use convert function because he can't convert CHAR to INT implicitely..
What is the syntax then ?
One way would be
select convert(char, intvalue) + charvalue from ...

Michael


Quote:
"Bret Halford" <bret (AT) sybase (DOT) com> a écrit dans le message news:
34c88f2b.0407061358.5ee149b7 (AT) po...OT) google.com...
"Nicolas Mainczyk" <nmainczyk (AT) hotmail (DOT) com> wrote in message
news:<cceenn$lp6$1 (AT) ngspool-d02 (DOT) news.aol.com>...
Hi,

What is the equivalent for CONCAT() syntax in sybase ?

TIA,
Nicky.


We really can't answer that unless you describe what it is that this
"CONCAT()" syntax does in the first place.

If you are looking to concatenate two char or varchar values, you can
use the "+" operator:

select "abc" + "def"
go

-bret
--
Michael Peppler Data Migrations, Inc.
mpeppler (AT) peppler (DOT) org http://www.peppler.org/
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or
long term contract positions - http://www.peppler.org/resume.html



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.