Hi All

I'm trying to create a view such that a person who has more than 1 job has
all their jobs shown as a concatenated string

Eg.

Person table
id: 960              name: Karl
id: 961              name: Paul
id: 962              name: Sharon

Jobs table
id: 1                  name: Fisherman
id: 2                  name: Spy
id: 3                  name: Analyst Programmer
id: 4                  name: Cleaner

Persons_Jobs table
person_id: 960   jobs_id: 2
person_id: 960   jobs_id: 4
person_id: 960   jobs_id: 3
person_id: 961   jobs_id: 1

Would give me....

Name                Jobs

Karl                  Spy|Cleaner|Analyst Programmer
Paul                  Fisherman
Sharon              <null>  -- it's important to include the names even if
they don't have a job

I've only got access to SQL7 and so therefore no UDFs

Any ideas how I could do this without using CF?

Karl

 


Karl O'Sullivan
Senior Analyst/Programmer

Computer & Network Services
UHCW NHS Trust
Clifford Bridge Road
COVENTRY
CV2 2DX

Contact:
Tel (internal): 28952
Tel (external): +44 (0) 24 7696 8952
Email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
Web: www.uhcw.nhs.uk <http://www.uhcw.nhs.uk>  

 

 

Reply via email to