I have a table that contains the following:
LOANID,PAYMENTDATE,PAIDTAG,PAYMENTAMOUNT
-----------------------------------------------------------------------------------
1 01/01/04 0 100
1 02/01/04 0 100
2 01/01/04 0 100
2 02/01/04 0 100
I need to create a VIEW that contains only 1 record for each loan id where paidtag = 0
I tried a SELECT DISTINCT query but I couldnt get it working.
SELECT DISTINCT LOANID,PAYMENTDATE,PAYMENTAMOUNT
FROM MyTable
WHERE PAIDTAG = 0
does not give me distinct records for each loan id.
Any help is appreciated.
--
Tim Morrison
--------------------------------------------------------------------------------
Vehicle Web Studio - The easiest way to create and maintain your vehicle related website.
http://www.vehiclewebstudio.com