asp from relational access db

A

aw

I have this problem,creating an asp from access in
frontpage

table1(personel)
ID CODE SURNAME
1 smi01 smith
2 abc02 abconal

table2 (review)
ID CODE REVEIWER
1 smi01 abco2

***Query***
table1 table2 table1_1
CODE -------CODE
SURNAME REVEIWER---CODE
SURNAME
SELECT reveiw.code, personel.surname, reveiw.reveiwer,
personel_1.surname
FROM personel INNER JOIN (reveiw INNER JOIN personel AS
personel_1 ON reveiw.reveiwer = personel_1.code) ON
personel.code = reveiw.code;

query result desired
CODE SURNAME REVEIWER SURNAME(of reviewer)
smi01 smith abc02 abconal


but I am getting
CODE SURNAME REVEIWER-CODE SURNAME(of reviewer)
smi01 abconal abc02 abconal

as the surname field appears twice!

Any help would be great
 
K

Kevin Spencer

You're pulling data from 2 different "Surname" fields: personel.surname and
personel_1.surname. If you want to name the columns differently, use aliases
Example:

SELECT reveiw.code AS Code, personel.surname AS Personel_Surname,
reveiw.reveiwer As Reviewer, personel_1.surname As Personel_1_Surname ...

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top