Quote:
|
Originally Posted by rahul_s80
db2 => select 'Rahul' || 'Singh' from sysibm.sysdummy1
1
----------
RahulSingh
but it is giving error on db2 clp ?  dont know why..
neways you can also use concat scalar function
|
The | simbol is operating system command. If you would like to use operating system commands like |, > or < you need to specifiy double quotes before and after the command so:
db2 "select 'Rahul' || 'Singh' from sysibm.sysdummy1"
Another way is to use CONCAT statement:
db2 select 'Rahul' CONCAT 'Singh' from sysibm.sysdummy1
Another way is to use CONCAT function:
db2 select CONCAT('Rahul', 'Singh') from sysibm.sysdummy1
I prefere using CONCAT as statement because it is the most readiable one.