I am building a simple report that uses a left outer join to link instrument table (bu_t) to result table (rslt_pat_t). I am not getting the expected results. I expect to get every instrument regardless of whether there are results assoicated with that instrument or not. I am only getting instruments that have results in the result table.
I have experienced and posted this problem before (thread149-1154885). The only response addressed this as an "SQL" and "Command Object" issue. I am only a Crystal Report user (not a programmer) and hope that a solution can be found within the CR application. I am using CR v.11. I am posting the SQL query found within CR (by using the "Show SQL query" function), but please remember this is built by the application and I do not have the knowledge to edit it outside the application.
SELECT "bu_t"."bu_serial", "rslt_pat_t"."rslt_date_time",
"rslt_pat_t"."nu_name", "rslt_pat_t"."site_abbrev", "rslt_pat_t"."pat_id",
"rslt_pat_t"."pass_flg", "rslt_pat_t"."rslt"
FROM "lfs_main"."dbo"."bu_t" "bu_t" LEFT OUTER JOIN
"lfs_main"."dbo"."rslt_pat_t" "rslt_pat_t" ON
"bu_t"."bu_sys_id"="rslt_pat_t"."bu_sys_id"
WHERE "rslt_pat_t"."rslt_date_time">={ts '2008-05-13 14:00:01'} AND
"rslt_pat_t"."site_abbrev"='UAH' AND "rslt_pat_t"."nu_name" LIKE '3c3%'
ORDER BY "bu_t"."bu_serial", "rslt_pat_t"."rslt_date_time
I have experienced and posted this problem before (thread149-1154885). The only response addressed this as an "SQL" and "Command Object" issue. I am only a Crystal Report user (not a programmer) and hope that a solution can be found within the CR application. I am using CR v.11. I am posting the SQL query found within CR (by using the "Show SQL query" function), but please remember this is built by the application and I do not have the knowledge to edit it outside the application.
SELECT "bu_t"."bu_serial", "rslt_pat_t"."rslt_date_time",
"rslt_pat_t"."nu_name", "rslt_pat_t"."site_abbrev", "rslt_pat_t"."pat_id",
"rslt_pat_t"."pass_flg", "rslt_pat_t"."rslt"
FROM "lfs_main"."dbo"."bu_t" "bu_t" LEFT OUTER JOIN
"lfs_main"."dbo"."rslt_pat_t" "rslt_pat_t" ON
"bu_t"."bu_sys_id"="rslt_pat_t"."bu_sys_id"
WHERE "rslt_pat_t"."rslt_date_time">={ts '2008-05-13 14:00:01'} AND
"rslt_pat_t"."site_abbrev"='UAH' AND "rslt_pat_t"."nu_name" LIKE '3c3%'
ORDER BY "bu_t"."bu_serial", "rslt_pat_t"."rslt_date_time