CR 8.5, Oracle DB
I have a question on conditional outer join.
I have 2 tables, Table_Name contains the person's name with vital information such as SNN and DOB. Table_ID contains various ID's with an ID_code and a common ID Number field that a person may have such as Driver's License (DL) , Insurance Number (IN), Passport number (PI), Employee ID (EI), etc.
The 2 tables are linked via a system-generated person_id number
I want to extract a group of people whose name begins with "A" and their driver's license (if one is present).
In SQL, I can write the following and get what I need.
Select distinct
Name,
ID_Number
from
Table_name,
Table_ID
where
Table_ID.ID_CODE(+)= 'DL' and
Table_ID.Person_id(+) = Table_name.Person_id and
Table_name like 'A%'
This resulted in all names starting with the letter A and optionally, their driver's licence.
Without placing the Table_ID.ID_CODE(+)= 'DL' in the Show SQL Query, is there a way of achieving this in CR without the use of subreports?
When the statement, Table_id.ID_Code = "DL", was placed in the select expert, then result were names with DL only and missing those names that did not have a DL
I also tried writing a formula for the ID number but that resulted duplicate records, one for each id record where ID_Code <> "DL"
//ID formula
if table_id.id_code = "DL" then
ID_Number
else
""
Any suggestions?
Thanks,
Larry
I have a question on conditional outer join.
I have 2 tables, Table_Name contains the person's name with vital information such as SNN and DOB. Table_ID contains various ID's with an ID_code and a common ID Number field that a person may have such as Driver's License (DL) , Insurance Number (IN), Passport number (PI), Employee ID (EI), etc.
The 2 tables are linked via a system-generated person_id number
I want to extract a group of people whose name begins with "A" and their driver's license (if one is present).
In SQL, I can write the following and get what I need.
Select distinct
Name,
ID_Number
from
Table_name,
Table_ID
where
Table_ID.ID_CODE(+)= 'DL' and
Table_ID.Person_id(+) = Table_name.Person_id and
Table_name like 'A%'
This resulted in all names starting with the letter A and optionally, their driver's licence.
Without placing the Table_ID.ID_CODE(+)= 'DL' in the Show SQL Query, is there a way of achieving this in CR without the use of subreports?
When the statement, Table_id.ID_Code = "DL", was placed in the select expert, then result were names with DL only and missing those names that did not have a DL
I also tried writing a formula for the ID number but that resulted duplicate records, one for each id record where ID_Code <> "DL"
//ID formula
if table_id.id_code = "DL" then
ID_Number
else
""
Any suggestions?
Thanks,
Larry