I have two table
I need to check data into consignment. If record exist in consignment table then I need to check this very record into delivery table. if Record matches with consignmnet table with delivery datable, then ok. If record does not matches then all columns from consignmnet(first table) table of that record should come out and bind it to gridivew.
Check this procedure it does not full fill my need
ALTER procedure [dbo].[sp_SelectOutStandingggg]
select cn.CODE_NAME as Booking_Branch,cn.CNMT,cn.TOO,cn.CNDT,cn.GOODS,cn.TOTAL,cn.NOPKG,cn.CWGHT,cn.DC,cn.PVTMARKA
from CONSIGNMENT as cn
join DELIVERY as dlv
where cn.CODE_NAME=@CODE_NAME and TOO=@TOO and (CNDT BETWEEN @sdate AND @edate) order by cn.CODE_NAME