Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
We have a table with two columns as follows"
Code_1 Code_2 Final_Code
ABC ABC
DEF DEF
ZYX 098 ZYX
123
456
789
Now the logic is, if we have a value in Code_1 column than the same should be copied in Final_Code, else if the value in Code_1 is NULL than the subsequent value from Code_2 should be copied into Final_Code.
Now the issue we are facing here is that we are unable to convert the Number in Code_2 field into String, hence the value from Code_2 is not getting copied into Final_Code.
Thanks in Advance
Hi
If you're doing this in your data model (loading script)
Sample:
Load
Code_1,
Code_2,
if(len(Code_1) > 0, Code_1, Code_2) as Final_Code
FROM SOURCE;
if your doing it on your straight/Pivot chart then just copy this in your chart
if(len(Code_1) > 0, Code_1, Code_2)
Hi,
You can convert it with using Text() function.
Load
Text(Code2) AS Code2..
Any other issue on this?