dunlop1975
IS-IT--Management
I seem to have hit a wall resolving this what I thought to be an easy problem
I need to build a report that will summarize certain procedures (main and sub)based off of patient req#. While a surgery will always have a main procedure they do not always have subs. Also a procedure can be a main or sub.
This system I am accessing, handles these procedures by placing them in 2 different tables : Main Surgery and Sub Surgery. Because not all surgeries have sub procedures, this table will not be populated for some cases (NULL).
This is where my problem lies, as soon as I try to reference the Main and Sub procedure tables to filter for the proper procedures I get no values.
I have tried to isolate the nulls:
i.e
if not(isnull(Sub Surgery.Req#)) then
(
Sub Surgery.Procedure = <Parameter> or
Main Surgery.Procedure = <Parameter>
)
else Main Surgery.Procedure = <Parameter>
Also tried aliases, changing join types, etc..
Here is a crude layout of how the tables are linked
Request Main Surgery
------- ------------
REQ# -->(inner) REQ#
Procedure
\
\ Sub Surgery
-----------
-> (Left REQ#
Outer) Procedure
I know I could easily resolve this using a subreport but this particular report needs to be an Excel extract eventually so am trying to make it as simple as possible for the end user
I need to build a report that will summarize certain procedures (main and sub)based off of patient req#. While a surgery will always have a main procedure they do not always have subs. Also a procedure can be a main or sub.
This system I am accessing, handles these procedures by placing them in 2 different tables : Main Surgery and Sub Surgery. Because not all surgeries have sub procedures, this table will not be populated for some cases (NULL).
This is where my problem lies, as soon as I try to reference the Main and Sub procedure tables to filter for the proper procedures I get no values.
I have tried to isolate the nulls:
i.e
if not(isnull(Sub Surgery.Req#)) then
(
Sub Surgery.Procedure = <Parameter> or
Main Surgery.Procedure = <Parameter>
)
else Main Surgery.Procedure = <Parameter>
Also tried aliases, changing join types, etc..
Here is a crude layout of how the tables are linked
Request Main Surgery
------- ------------
REQ# -->(inner) REQ#
Procedure
\
\ Sub Surgery
-----------
-> (Left REQ#
Outer) Procedure
I know I could easily resolve this using a subreport but this particular report needs to be an Excel extract eventually so am trying to make it as simple as possible for the end user