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

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -