-
need a query without using union
object :
To get the details from user who are not having any contact.
1.user table
-------------
owner -> uid
owner have more users.
the contact may be on two ways
2. Interaction table
---------------------
Rel columns => interaction_uid = owner.uid
3. opportunity (o) -> interaction (i), user (u) table
------------------------------------------------------
Rel.columns => 1.i.interaction_uid = u.owner_uid and
2. i.parent_oid = o.uid
3. value < 5 (where condi)
relationship is like this.
select user_name,uid from user
where uid not in
(select interaction_uid
from interaction i, opportunity o
where i.parent_uid = o.uid
and o.value < 5
union
select interaction_uid from user u,interaction i
where u.uid = i.interaction_uid )
and o_uid = '&owner_id'
i have written the query using union clause.
but developer want to written in sql without using union .ie. using joins
tks in advance
Last edited by balasmg; 06-28-2005 at 09:32 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|