|
Posted by --CELKO-- on 12/01/06 19:21
An attribute is an identifier or a category, but not both by
definition. I assume that records means phonographic records so we
would use the RIAA number as the key - hey, no DDL or specs and I am
free to assume industry standards and make the names meaningful.
SELECT R1.record_category, R1.riaa_nbr
FROM Records AS R1
WHERE R1.riaa_nbr =
(SELECT TOP 1 R2.riaa_nbr
FROM Records AS R2
WHERE R1.record_category = R2.record_category
ORDER BY NEWID());
Roy just got the corelation names wrong. This is also untested code.
Navigation:
[Reply to this message]
|