AnsweredAssumed Answered

ExecuteSql question

Question asked by GautamBagaria on Jul 1, 2014
Latest reply on Jul 1, 2014 by philmodjunk


ExecuteSql question


     ExecuteSQL ( "select sum(L.POInvAmt) from Ledger L where BudgetCategory= ?"; ""; ""; BudgetCategory)

     I have BudgeCategory as Global. Now I have subCategory as global, how would I write or rather can I write...

     select sum(L.PO..)....where BudgetCategory =? and subcategory =? ";"";"";BudgetCat , SubCat) or something similar?

     I will try to make this a little more clear...

     123 - a,a a,a a,a a, b,b,b,b,c,c,c,c,c,c

     456 - a,a,a,a,b,b,b,b,c,c,c,c,c,c

     123 and 456 are BC's a,b,c are SC's and I need sum of all a/b/c within 123 or 456 or watever.