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 I can not one from both). If Member_ID is smaller than 100.000 the data from Members is taken. I can not join all 3 tables because a member is either a member of Member or OldMember, never of both. I would need in mySQL query something like IF, but not to make a value of "yes" or "no", but something like "IF Member_ID > 100.000 then .... ELSE ..." I have 1000 records in Data table and I need to have Usernames either from one or from the second Member table. I can not do that... SQL doesn't seem to have such strong programming language to make complex sentance. I tried using IF and put a result string like part of SQL query, like "AND MEMBER.MEMBER_ID = Data.Member_ID" or "AND OLDMEMBER.MEMBER_ID = Data.MEMBER_ID" and the inserting the result (I called it "thequery") into WHERE part but doesn't work... I am really stuck... The only way to think is: Simply take all 1000 records without join and inside a for...next loop in ASP look what the ID_MEMBER of record is and make SELECT statement inside this loop. Now I am not sure how efficient is this... Means every record from 1...1000 would open a new recordset from the members or oldmembers table. There must be another way directly from the SQL query. I looked everything on Internet about this problem and couldn't find any solution. Could you just point me to any direction, is this possible or not? Thank you a 1000 times... Yours Jerry Slovenia --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php