If I understand what you are trying to do, you will need to include the
table containing the detailName and detailValue twice in your join.
Once to extract the height value into it's own column and once to
extract the IQ value into it's column.
See the SQL below, let me know if this is not what you were trying to
b.detailValue as HEIGHT,
a.userID as ID,
a.userName as NAME,
c.detalValue as IQ
INNER JOIN <table_name2> b on a.CUSTID = b.CUSTID
INNER JOIN <table_name2> c on a.CUSTID = c.CUSTID
b.detailName = 'height'
c.detailName = 'IQ'
From: dont worry [mailto:aspmailbox@y...]
Sent: Thursday, March 07, 2002 11:16 AM
To: Code Clinic
Subject: [proasp_codeclinic] help with sql query
I have a two tables.
A)has userId and userName
B)has userId, detailId, detailName, detailValue
So with a inner join I could extract.
I want to create a query that would allow me to group
with in the same table. Or would give me IQ in each
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!