Skip to content
Snippets Groups Projects
Commit 23ca16fb authored by Martin Groppe's avatar Martin Groppe
Browse files

[Projekt: xRM-Marketing][TicketNr.: 1082688][CampaignCost: AditoRuntimeException]

parent ee955896
No related branches found
No related tags found
No related merge requests found
import("system.result");
result.string("SUM(CAMPAIGNCOST.NET/(select COUNT(*) from CAMPAIGNPARTICIPANT where CAMPAIGNCOST.CAMPAIGN_ID = CAMPAIGNPARTICIPANT.CAMPAIGN_ID "
+" and CAMPAIGNPARTICIPANT.CAMPAIGNSTEP_ID = CAMPAIGNSTEP.CAMPAIGNSTEPID))");
\ No newline at end of file
var countSql =" (select COUNT(*) from CAMPAIGNPARTICIPANT where CAMPAIGNCOST.CAMPAIGN_ID = CAMPAIGNPARTICIPANT.CAMPAIGN_ID "
+" and CAMPAIGNPARTICIPANT.CAMPAIGNSTEP_ID = CAMPAIGNSTEP.CAMPAIGNSTEPID)";
result.string(" SUM(CAMPAIGNCOST.NET/( case when "+countSql+" != 0 then "+countSql+" else 1 end)) ");
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment