Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invalid String Constant

Status
Not open for further replies.

ASG0856

Programmer
Sep 15, 2006
337
0
0
GB
Help
We are running Actuate 7 against an Aircraft Engineering Database. The following code comes from the original IQ Report to calculate the remaining life:
NVL(case when NVL(cadb:'lits'.longtth.act_occ, 0) = 0 then (cadb:'lits'.longttn.fst_mtr_red - cadb:'lits'.prmr.cum_met_red)
[Red] else case when
NVL(cadb:'lits'.stdfreq.fix_sch_ind, 'N') = 'Y' then cadb:'lits'.longttn.frm_int - (cadb:'lits'.prmr.cum_met_red - cadb:'lits'.schfreq.trg_lmu_val ) [/Red]
else cadb:'lits'.longttn.frm_int - ( cadb:'lits'.prmr.cum_met_red - cadb:'lits'.longttn.lst_acl_mtr ) end end, 0.00)


It is set as a calculated field in the QBE SQL, and Actuate happily accepts it. However, when an attempt to run the Report in ErdPro is made it fails with an Invalid String Constant. If I remove the line in red, it runs quite happily. We here cannot see what's wrong, but maybe we're to close. Thnxs in advance for any advice.
ASG
 
If you remove the red lines it works? Even though there are two 'END's there? Is there another case statment? Or do you remove the other end?
 
To clarify, the reference to that case statement is removed in its entirety, including the 'End' that goes with the case statement.
ASG
 
Did you solve this one yet? You can tyr a few things and nothing looks out of place here, but I'm wondering if the rules of the case mean you have to end the inner and then the outer and they can't share an else? Can you try the select case statement?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top