Below is the query I am creating in SQL Designer. It works fine except it is not showing
the description field. Description field is a memo field. It's datatype is long.
Moreover if I change 'union all' to 'union' (which is what I want), query is not returning any row.
select a.name,c.first_name,c.last_name,g.description
from table_opportunity a,
table_con_opp_role b,
table_contact c,
table_act_entry f,
table_notes_log g,
table_participant h
where a.objid = b.con_role2opportunity
and b.opp_role2contact = c.objid
and h.PARTICIPANT2ACT_ENTRY = f.objid
and h.focus_type = 5000
and f.FOCUS_TYPE in (27,28,154)
and h.focus_lowid = a.objid
and f.ACT_ENTRY2NOTES_LOG = g.objid
and c.first_name = 'Clifford'
union all
select a.name,c.first_name,c.last_name,g.description
from table_opportunity a,
table_con_opp_role b,
table_contact c,
table_act_entry f,
table_notes_log g,
table_participant h
where a.objid = b.con_role2opportunity
and b.opp_role2contact = c.objid
and h.PARTICIPANT2ACT_ENTRY = f.objid
and h.focus_type = 45
and f.FOCUS_TYPE in (27,28,154)
and h.focus_lowid = c.objid
and f.ACT_ENTRY2notes_LOG = g.objid
and c.first_name = 'Clifford'
Any help would be appreciated.
Thanks,
Arthi
the description field. Description field is a memo field. It's datatype is long.
Moreover if I change 'union all' to 'union' (which is what I want), query is not returning any row.
select a.name,c.first_name,c.last_name,g.description
from table_opportunity a,
table_con_opp_role b,
table_contact c,
table_act_entry f,
table_notes_log g,
table_participant h
where a.objid = b.con_role2opportunity
and b.opp_role2contact = c.objid
and h.PARTICIPANT2ACT_ENTRY = f.objid
and h.focus_type = 5000
and f.FOCUS_TYPE in (27,28,154)
and h.focus_lowid = a.objid
and f.ACT_ENTRY2NOTES_LOG = g.objid
and c.first_name = 'Clifford'
union all
select a.name,c.first_name,c.last_name,g.description
from table_opportunity a,
table_con_opp_role b,
table_contact c,
table_act_entry f,
table_notes_log g,
table_participant h
where a.objid = b.con_role2opportunity
and b.opp_role2contact = c.objid
and h.PARTICIPANT2ACT_ENTRY = f.objid
and h.focus_type = 45
and f.FOCUS_TYPE in (27,28,154)
and h.focus_lowid = c.objid
and f.ACT_ENTRY2notes_LOG = g.objid
and c.first_name = 'Clifford'
Any help would be appreciated.
Thanks,
Arthi