Click to See Complete Forum and Search --> : Tables


nkagi
June 5th, 2009, 04:27 AM
Hi All,

I have a hwakers database, and in this database I have tenant and product. A tenant can sell more than one product. now i would like to print a card with this tenant details as well as the products that he sells. now the problem is that if he selling more than one products, it gives more than one record and I would like for it to be just one record. Is this possible, if so how do I go about doing it? please see the attached PDF

olivthill2
June 5th, 2009, 04:39 AM
A hwakers database
Let's suppose it looks like Oracle or MySQL.
Which language do you use?
Let's suppose you have SQL.
Retrieving just one record can be achieved with SELECT DISTINCT ... if records are all the same.
Or you could use SELECT MAX(...), .....
Or, with Oracle, SELECT ... WHERE ... AND ROWNUM = 1.
Or SELECT TOP .....