Hi- I'm writing a query to show data from a table; the data has multiple records for the same ID:
Here is my query:
I only want to show the first comment-- how can I do that? This obviously shows all three comments for VendorID 1- I only want to show the first one...
Thanks.
Code:
Vendor Comment
1 Inovis as being a common practice that we both use.
1 Tom keeps getting VM. He will try again. CH
1 Tom spoke to contact and will help him get in touch
Here is my query:
Code:
Select
VI.Rank,
VI.DivisionName,
VI.VendorName,
VI.SKU,
VI.EDI,
C.Comment
FROM tblVendorInfo As VI
JOIN ENAPTEST.dbo.tblVendorComments As C ON VI.VendorID = C.VendorID
Where VI.VendorID = '1' AND DivisionName = 'BP'
I only want to show the first comment-- how can I do that? This obviously shows all three comments for VendorID 1- I only want to show the first one...
Thanks.