I have an inner join query that not's pulling the data that I need. It needs to pull one record where the int = 14 in the tblOnlineAAPAdjusters table. But it's pulling all the record id's that have joined by vchConfirmNum and vchPaymentNum. How can I get it to pull that one value?
Select vchRecordID from tblAAPPayment p join tblOnlineAAPAdjusters a on a.vchConfirmNum = p.vchPaymentNum where a.intID = '14'
the RecordID belongs to tblAAPPayment. tblOnlineAAPAdjusters doesn't have a vchRecordID, but it has the confirmation num which is the same as the paymentnum in the Payment table.
Michael Carrillo
What is the datatype of tblOnlineAAPAdjusters .vchConfirmNum and
tblOnlineAAPAdjusters .vchPaymentNum?
Try
Select a.vchRecordID
from tblAAPPayment p
inner join tblOnlineAAPAdjusters a on a.vchConfirmNum = p.vchPaymentNum
where a.intID = 14