tbl_ReceivedPayment
Id          MainId    InvoiceId        Amount
28 22 121 1000 30 31 18 300 31 31 18 100
I want to write function which will accept Mainid as parameter and will return data as INV-001/500/300 +INV-002/800/100
There in one more table in tbl_InoiceMain In background which has InvoiceNo as columns
I want result in  variable like this
ie invoiceNo/InvoiceAmt/PaidAmt
INV-001/500/300
INV-002/800/100
Basically i want to run loop in table to get data from multiple row and column in one variable.


...

Go to the complete details ...