Hi
I am using around 10 stage variables each have different if conditions
and i concatinate all stage variables and insert into a column.
like var1:var2------var10 into Name varchar2(288) field.
My problem is when i concatinate all variables i am getting null but if i test individually each result of variable it is working fine .
I want to know how can we solve this problem
thks
concatination of stage variables
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The only way you'll get null from concatenation is if one of the operands is null. The individual expressions should not generate null if you're planning to concatenate. Generate "" or " " instead.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 56
- Joined: Mon Oct 16, 2006 7:32 am
-
- Premium Member
- Posts: 1255
- Joined: Wed Feb 02, 2005 11:54 am
- Location: United States of America
You must be getting one or more stage variables as NULL value which is causing the value of the whole expression to be NULL.
Try by starting with just two, then three and so on. This way you could find out which Stage variable is coming in as NULL.
Whale.
Try by starting with just two, then three and so on. This way you could find out which Stage variable is coming in as NULL.
Whale.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
-
- Premium Member
- Posts: 1255
- Joined: Wed Feb 02, 2005 11:54 am
- Location: United States of America
Wow...Too late
You can use the following DSTransforms for converting the NULL's
Whale.
You can use the following DSTransforms for converting the NULL's
Code: Select all
NullToEmpty
Or
NullToZero
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
NullToEmpty would be the proper choice in this case:
No need for it on a field you know will never be null, but if there is any doubt...
Code: Select all
NullToEmpty(var1):NullToEmpty(var2): <etc>
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers