SV: Need help with SELECT 2 tables from choice of 3

2001-11-22 Thread Torgil Zechel
You can join all three tables together select d.members_id, m.name, old.name from data as d left join members as m on m.members_id=d.members_id left join oldmembers as old on old.members_id=d.members_id If the members_id belongs to an old member, all fields from the member table

RE: Need help with SELECT 2 tables from choice of 3

2001-11-22 Thread Jerry
>Can't you just make a check before you make a call to the DB? >if( member_id > 1000 ) > // old member query here >else > // new member query here Now I did just that, but that means I have to open recordset 20 times a page (for each record separately)... I am a begginer, I don't kn

SV: Need help with SELECT 2 tables from choice of 3

2001-11-22 Thread Torgil Zechel
ED] Amne: Re: Need help with SELECT 2 tables from choice of 3 >>Why no have 3 tables: >>Members >>Data >>TheseMembersAreOld >>Members and Data are as you have them defined. TheseMembersAreOld >>contains only the Member_ID field. >>You then make the Mem

Re: Need help with SELECT 2 tables from choice of 3

2001-11-21 Thread Jerry
>>Why no have 3 tables: >>Members >>Data >>TheseMembersAreOld >>Members and Data are as you have them defined. TheseMembersAreOld >>contains only the Member_ID field. >>You then make the Member_ID field primary key on TheseMembersAreOld and >>Members. You can then perform a very fast joins. >H

Re: Need help with SELECT 2 tables from choice of 3

2001-11-21 Thread Thomas S. Iversen
> OldMembers > Memebers > Data Why no have 3 tables: Members Data TheseMembersAreOld Members and Data are as you have them defined. TheseMembersAreOld contains only the Member_ID field. You then make the Member_ID field primary key on TheseMembersAreOld and Members. You can then perform a very

Need help with SELECT 2 tables from choice of 3

2001-11-21 Thread Jerry
Hi there I need help :-)) If anybody could be so kind and help me... I have 3 tables: OldMembers Memebers Data In Data there is a field Member_ID. Now in this field all members bigger than 100.000 are old ones and must be taken from the OldMembers table (both tables are not using same data so