Hello,
I tried to create a Vaiable in WEBI and samething as object in Universe I am getting an Error.For both variable and object formula’s and Error are given Below.Thanks in Advance.
Variable:
=IF([ Code])= “TWT”;“TWT”;
if([Code]) ="";“BLS”;
if ([Code])="S"or ([lvl])=“S”;“SCT”;
if ([Code])= “A”;“ALS” + ([lvl])
if ([BLS]) = “T”;“TWT”
if ([BLS]) = “R”; “AIR”;))))))
Error :- Missing ‘,’ Before Argument in function ’ If’ at Position 19.Error WIS10062.
In Universe Object:
CASE
When(MST.Code)=“TWT” THEN “TWT”
(MST.pLS) = “” then “BLS”
(MST.pLS) = “S” or (MST.LVL) = “S” then “SCT”
(MST.pLS) = “A” then “ALS” || (MST.LVL)
(MST.pLS) = “T” then “TWT”
(MST.pLS) = “R” then “AIR”
END
Error:- Parse failed:Exception:DBD-[IBM] Iseries Access ODBC Driver][DB2 UDB] SQL 0104-token= was not valid token:END State:37000
CASE
When MST.Code='TWT' THEN 'TWT'
When MST.pLS = '' then 'BLS'
When MST.pLS = 'S' or MST.LVL = 'S' then 'SCT'
When MST.pLS = 'A' then 'ALS' || MST.LVL
When MST.pLS = 'T' then 'TWT'
When MST.pLS = 'R' then 'AIR'
END
Although, unsure of the two pipes method of concatenation, I’ve never had to work with DB2…
I can Parse the report Variable but it is taking very long time to Run the objects into query panel so we decided to create an object. I used the Case Statement and still I am getting the same Error.
CASE
When MST.Code=‘TWT’ THEN ‘TWT’
When MST.pLS = ‘’ then ‘BLS’
When MST.pLS = ‘S’ or MST.LVL = ‘S’ then ‘SCT’
When MST.pLS = ‘A’ then ‘ALS’ || MST.LVL
When MST.pLS = ‘T’ then ‘TWT’
When MST.pLS = ‘R’ then ‘AIR’
END
Note:- MST.Code, MST.pLS and MST.LVL are Three Objects.
I used the following Formula but it is not Parsing.
IF Trim([Tal] = “TWT” THEN “TWT”
ELSE if[ Code] = “”; Or “B”; then “BLS”;
else if [ Code] = “S” or ([LVL]) = “S” then “SCT”;
else if [Code] = “A” then “ALS” + ([lvl]);
else if [Code] = “T” then “TWT”;
else if [Code] = “R” then “AIR”))))))
I have to use the Triim Function to the Above mentioned Formula and without Trim , I am able to make the Variable.Need to make the Variable using Trim.
Thanks
Pooja
=IF([ Code]= "TWT";"TWT";
if([Code] ="";"BLS";
if([Code]="S"or [lvl]="S";"SCT";
if([code]= "A";"ALS" + [lvl];
if([BLS] = "T";"TWT";
if([BLS] = "R"; "AIR" ))))))
Your code seems to be confusing. I have some doubts -
What is [|V|]?
What is [BLS]?
Else this variable should not take much time at report level. For an eg.:
Hello aniketp,
Thanks for Your Reply. The Below Formula is Working fine but i could not get the Space things working in my Reports.I have numbers of Clients which has space but it is not working.I have to show if Code has Spcae or “B” than it is BLS.