I'm very experienced with Crystal (10+ years), but I've never made use of SQL Expressions before, and I'm running into issues. I'm using Crystal XI (11.5.10.1263) with an Oracle database.
The strange part is that some work and some do not, and I'm unable to figure out any rhyme or reason as to why. Not sure if things like full report listings will be helpful here, so I'll post them if asked.
Here's an example of one that works in one report:
(select max("PS_LOCATION_TBL"."EFFDT")
from "PS_LOCATION_TBL"
where "PS_LOCATION_TBL"."LOCATION" = "PS_DM_EMPL_CURR_VW"."LOCATION")
And here's an example of one that does not in a different report:
(select max (INNERALIAS."EFFDT")
from "PS_DM_EMPL_HIST_VW" INNERALIAS
where INNERALIAS."EFFDT" < "PS_DM_EMPL_HIST_VW"."EFFDT" and
INNERALIAS."EMPLID" = "PS_DM_EMPL_HIST_VW"."EMPLID")
The error I get is:
Error in compiling SQL Expression:
Failed to retrieve data from the database.
Details: ORA-00904:"PS_DM_EMPL_HIST_VW"."EMPLID": invalid identifier
[Database Vendor Code: 904].
I know you might not have enough information to come up with an answer here, but I'm not sure what other details will be helpful; I'm glad to provide more information as needed.
Thanks!
The strange part is that some work and some do not, and I'm unable to figure out any rhyme or reason as to why. Not sure if things like full report listings will be helpful here, so I'll post them if asked.
Here's an example of one that works in one report:
(select max("PS_LOCATION_TBL"."EFFDT")
from "PS_LOCATION_TBL"
where "PS_LOCATION_TBL"."LOCATION" = "PS_DM_EMPL_CURR_VW"."LOCATION")
And here's an example of one that does not in a different report:
(select max (INNERALIAS."EFFDT")
from "PS_DM_EMPL_HIST_VW" INNERALIAS
where INNERALIAS."EFFDT" < "PS_DM_EMPL_HIST_VW"."EFFDT" and
INNERALIAS."EMPLID" = "PS_DM_EMPL_HIST_VW"."EMPLID")
The error I get is:
Error in compiling SQL Expression:
Failed to retrieve data from the database.
Details: ORA-00904:"PS_DM_EMPL_HIST_VW"."EMPLID": invalid identifier
[Database Vendor Code: 904].
I know you might not have enough information to come up with an answer here, but I'm not sure what other details will be helpful; I'm glad to provide more information as needed.
Thanks!