sql - Calculating sum with uneven rows from multiple table -


enter image description here

i tried adding 2 data tables in vb.net fails when group has 3rd level child (for e.g. if added 12, regular fees,5 in group table) please tell me how can query database when child node creation unlimited @ group table

currently trying call calc sub

public sub calc ds.fill("select * group")  =0 ds.tables("group").count-1  getheadamt(ds.tables("group").rows(i).item(0)  next end sub public function getheadamt(byval mcode integer)     filldataset("select * [ledgers] undergroup=" & mcode, "gethead")     dim closbal double = getledgeramount(mcode)     = 0 ds.tables("gethead").rows.count - 1         closbal = closbal + getledgeramount(ds.tables("gethead").rows(i).item(0))     next     return math.abs(closbal) end function function getledgeramount(byval mcode integer)     dim bal double = trans(string.format(select isnull(sum(amount),0)+isnull(sum(opbal),0) transactions id='{0}'", mcode))     return bal end function 


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -