BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

HELP! :: No "MINUS" or "EXCEPT" support in MySQL... How to

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
Steve
Guest





PostPosted: Sun Aug 24, 2003 12:24 am    Post subject: HELP! :: No "MINUS" or "EXCEPT" support in MySQL... How to Reply with quote



I am using MySQL 4.0. Unfortunately there is no support for "minus" or
"except".

So, let me describe a scenario for you.

Table "One" has the following structure:
=============================
id :: int
desc :: varchar(255)
with id being the primary key

Table "Two" has the following structure:
=============================
id1 :: int
id2 :: int
with both id1 and id2 being a combined primary key

In table "Two", both id1 and id2 reference the id in Table "One". I want to
create a select statement that would allow me to display the combinations of
id numbers that are not listed in Table "Two". Keep in mind that the id
numbers can be interchanged... for example, if I had an entry of "1" for id1
and "2" for id2, a similar entry of "2" for id1 and "1" for id2 would be the
same. So, essentially, I want to eliminate dual entries for the same
combination.

I would appreciate immensely some assistance here. Other than using minus
and except, I have no idea what to do here in terms of writing a SQL
statement that will work for MySQL 4.0.

Thanks!



Steve
[email]steven.kothenbeutel (AT) verizon (DOT) net[/email]






Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.