Built a Oracle SQL query that is joining columns from various tables, while using the 'distinct', 'union', and 'order by'.
Works well when I execute with Toad and Golden32 so I copied to DBID and built the tree etc.... Then wrote a map that executes the query. I'm now getting dup rows. Query looks something like...
select distinct(a.set_id),
'X' record_type,
b.user_id,
b.user_id_alt,
b.last_name,
b.first_name,
c.config_col1,
.
.
.
from table1 a, table2 b, table3 c,...
where a.value_1 = 'x'
and....
and....
and....
union
select distinct(a.set_id),
'Y' record_type,
b.user_id,
b.user_id_alt,
b.last_name,
b.first_name,
c.config_col1,
.
.
.
from table1 a, table2 b, table3 c,...
where a.value_1 = 'y'
and....
and....
and....
order by ......
Why would I need get duplicate x and y rows via DBID but not with one of the tools I used nor when using sqlplus?
Works well when I execute with Toad and Golden32 so I copied to DBID and built the tree etc.... Then wrote a map that executes the query. I'm now getting dup rows. Query looks something like...
select distinct(a.set_id),
'X' record_type,
b.user_id,
b.user_id_alt,
b.last_name,
b.first_name,
c.config_col1,
.
.
.
from table1 a, table2 b, table3 c,...
where a.value_1 = 'x'
and....
and....
and....
union
select distinct(a.set_id),
'Y' record_type,
b.user_id,
b.user_id_alt,
b.last_name,
b.first_name,
c.config_col1,
.
.
.
from table1 a, table2 b, table3 c,...
where a.value_1 = 'y'
and....
and....
and....
order by ......
Why would I need get duplicate x and y rows via DBID but not with one of the tools I used nor when using sqlplus?