mardi 5 juillet 2016

How to Return Dynamic Table using Stored Procedure

I have two tables tblCustBilIinfo with

(Bill_no,Customer_Name,date,bill_Amount,deposit,Balance)
And tblincome with (Tid,date,name,amount)

Now I need to show record like this

Select  c.Bill_Amount,I.Amount ,C.balance from tblcustBillInfo as C, tblincome As I 
where C.customer_Name ='rakesh' 
and date between '24-06-2016' And '30-06-2016' 

Now selected record is like in Balance sheet format Like in accounting (debit credit.) First Select Bill_ amount then debit amount of customer.

And also need to select date column but it values is selected from above tables on the bases of selected record.

Please can any one Help me to solve. Or guide me to use procedure or function to achieve that task.

Aucun commentaire:

Enregistrer un commentaire