Subject Re: [firebird-support] Show individual duplicates
Author Lester Caine
serge.fonville wrote:
> Hi,
>
> I have two tables:
> persons:
> ID,name,skillLevelID
> 1,John,4
> 2,George,4
> 3,Caroline,2
> 4,Harold,3
> 5,Arnold,2
>
>
> SkillLevel:
> ID,Name
> 1,The Best
> 2,Good
> 3,Sufficent
> 4,Reasonable
> 5,Not that good
> 6,Bad
> 7,Awful
>
> The output should be
> Skilllevels:
> Person,level
> John,reasonable
> George,reasonable
> Caroline,Good
> Arnold,Good

Simple

SELECT a.NAME, b.NAME
FROM PERSONS a
JOIN SKILLLEVEL b ON a.SKILLLEVELID = b.ID

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php