concat issue

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
times29
Premium Member
Premium Member
Posts: 202
Joined: Mon Sep 22, 2008 3:47 pm

concat issue

Post by times29 »

Hi,

FISCAL_YEAR_NUMBER is decimal 4
JE_PERIOD_NUMBER is decimal 2

i want to get SORT which is decimal 8 as 20141 20142

i am doing as below its just giving me 2014 no period number
FISCAL_YEAR_NUMBER : JE_PERIOD_NUMBER

Any idea what is wrong
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

JE_PERIOD_NUMBER does not actually have a value?

Show us your actual derivation.

Use the debugger to watch the values on the links.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You can only concatenate together string fields.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

chulett wrote:You can only concatenate together string fields.
True, but the concatenation operator will automatically cause implicit conversion of its operands to string data type if necessary.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

Will it automatically convert decimals to string? I thought only integer could have intrinsic conversion...

I would still try using DecimalToString functions to see if that resolves it...
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Me, I would never trust anything like this to an implicit conversion... explicit all the way, please. That or look to see if you can use math to effect a solution so no conversion is needed.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply