If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

eqv cognos 8 function for iqd function

Started by maddycdp, 01 Apr 2012 10:55:30 AM

Previous topic - Next topic

maddycdp

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

cognostechie

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.

Mpotla

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,



MFGF

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
Meep!

blom0344

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?