var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: String + Decimal Concatenate
Problem is since the decimal datatypes contain records which are numbers they gets converted to char as use char(colb)
select COLA || '|', - String
COLB '|', - Decimal
COLC '|', - String
COLD '|', - Decimal
COLE - String
Sample Output before conversion
But when concatenate happens the number changes to like this
ABC 48.0000 POP 49.75000 OOO
Sample Output after conversion
Since the 000 are not consistent i can't use a replace function.
What i need is concatenate the record with Pipe Separated but the decimal values should be intact.
Last edited by dinjo_jo; 12-17-09 at
change the data type and strip it. For instance strip(char(colb),l,'0')
would it remove the correct 000 which are after 48.0000
you can, also, use B instead of L, this would remove leading and trailing. Another way of doing this if say you want to retain 2 places after the decimal point would be to use a substr along with the strip of leading 0's.
STRIP( CHAR( DEC( colb , xx , 2 ) ) , L , '0' )
if say you want to retain 2 places after the decimal point
select COLA || '|' || varchar(COLB) || '|' ||
COLC || '|' || varchar(COLD) || '|' || COLE