Hi All,
We are converting old impromptu based iqds into Framework based query subjects. In the part of iqd I have a following case statement. In that I have no clue for pack( ) function .
Please help me out to find eqv function for pack( ).
Case statement;
CASE WHEN (Table1.Column1 IS NULL) or (Table1.Column1 = 0)
THEN (pack('(OPEN POSITION) - ')) || (upper(Table2."Column2"))
ELSE (pack('Xyz - ' || Table2."column1" || T3."column2"))
END
Thanks in Advance
Maddy
It is hardcoding 'OPEN POSITION -" and 'Xyz -' before concatenating the values from the values depending on whether Table1.Columns1 is null/0 or has a value.
Try If Then Else statement with a similar condition.
I saw your other post also regarding the Date syntax. A good way to understand it would be to see the cube requirements or check the the input Data in Transformer to see what is the format of the Date provided and then do the same in Framework Manager.
Hi ,
Please try the below expressions,
i would prefer you to use the second option, which would give better performance than the first one.
1)
Case statement;
CASE
WHEN (Table1.Column1 IS NULL) or (Table1.Column1 = 0)
THEN (('(OPEN POSITION) - ')) || (upper(Table2."Column2"))
ELSE (('Xyz - ' || Table2."column1" || T3."column2"))
END
2)
Case statement;
CASE
WHEN (Table1.Column1 IS NULL or Table1.Column1 = 0) THEN
(concat('OPEN POSITION) - ', upper(Table2.Column2))
ELSE (concat('Xyz - ' ,concat( Table2.column1 , T3.column2)) )
END
thanks,
pack() is a function which converts multiple contiguous spaces in a string to a single space, and does clever stuff like recognising and removing spaces before a comma.
Regards,
MF.
Sent from my iPad using Tapatalk HD
Quote from: Mpotla on 01 Apr 2012 06:56:37 PM
Hi ,
Please try the below expressions,
i would prefer you to use the second option, which would give better performance than the first one.
1)
Case statement;
CASE
WHEN (Table1.Column1 IS NULL) or (Table1.Column1 = 0)
THEN (('(OPEN POSITION) - ')) || (upper(Table2."Column2"))
ELSE (('Xyz - ' || Table2."column1" || T3."column2"))
END
2)
Case statement;
CASE
WHEN (Table1.Column1 IS NULL or Table1.Column1 = 0) THEN
(concat('OPEN POSITION) - ', upper(Table2.Column2))
ELSE (concat('Xyz - ' ,concat( Table2.column1 , T3.column2)) )
END
thanks,
What makes you think performance would differ?