and the 2nd contains billno,itemid,qty,rate,value .
i want the values of itemname,unit from first table and qty,rate,value from 2nd table when we enter the values of billno. and itemcode.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Suthish NairPosted Feb 17, 2011, 2:15 PM
Micke BlomqvistPosted Feb 16, 2011, 8:12 AM
from items i
inner join bills b
on i.itemid = b.itemid
where b.billno = @billno and i.itemcode = @itemcode
Just replace items with your items tablename and bills with your bills tablename and assign the values to the two variables @itemcode and @billno.