Thanks...I see where you're going, and I'll give it a try.
Also...do you think the top sub-query would have the same effect of knocking the whole thing back to inner joins?
You're right, the first bit (looking for the dedcd's that start with 'Cx' could be replaced with another table. The rest, though - the ones that are looking for the max dates - cannot. Those are my real concern - I'm looking for a way to include those in the joins somehow, or perhaps use a UNIION.
Well, yes...thanks. That's what I thought. The problem I'm having is that I've been unable to find a way to rework the code to avoid that issue. When I tried to move the subqueries up into the joins, I get an error telling me that I can't use a subquery in an outer join. I've seen posts...
No...the second query is returning exactly what I'd expect - the joins are handled implicitly in the WHERE clause. The problem is that the second query is not returning rows where there are non-matching rows in some tables, hence the change to outer joins.
I found the cause of the initial...
Thanks T, but yes...I do know that it's actually a problem with the code and not something related to the infrastructure, permissions, or anything else along those lines. The following query works fine:
SELECT
(select sum(y.ded_cur)
from ps_pay_check x,
ps_pay_deduction y...
Hello! I'm newly back to writing SQL code, and I don't have a lot of experience writing queries using explicit join syntax. Here's my code:
SELECT
(
select sum(y.ded_cur)
from ps_pay_check x
INNER JOIN ps_pay_deduction y ON (x.company = y.company AND x.paygroup = y.paygroup AND...
Way to wreck my morning. ; )
It seems to me that, when the SQL Expression is run before it's saved, it isn't "aware" of the rest of the report context. Thus, references to the tables that are in the main report aren't recognized as valid. I suspect that, if there was a way to stop Crystal...
but when did enclose it I started getting "invalid identifier" - "INTAKE_PARTICIPANT"."PERSON_ID""
Yes, that's what I expected. : / I've searched many forums, and found many threads on this topic, and NONE have ever come to a conclusion...they always just peter out.
What version of Oracle...
Well, that's disappointing...not a single reply? I used to use this site all the time back about six years ago, and it was always a great source of info. I tried to be as thorough with my post as possible...is there something missing?
Hmmm...is this just not being seen, or does no one use SQL Expressions? I've searched and found a few old threads on this subject, but none of them ever came to a resolution. Seems odd...this is a really powerful piece of functionality, if it really works.
I know that this thread is ancient, but I thought I'd take a shot and see if this issue was ever resolved. I'm having the same issue now...did you ever find a solution?
I'm having ongoing issues with using SQL Expressions, and I'm hoping that there's some help to be had here. I'm using Crystal v11.5.10.1263, which is SP4 (I know, I know, I'm working with my vendor to get it updated.), against an Oracle 9.2.0.6 DB. The problem is that I keep getting this...
I actually just got it going a few seconds ago. Seems that Crystal requires that all tables referenced in SQL Expressions (at least in my application) must be referenced in the Database Expert. I added another instance of the PS_DM_EMPL_HIST_VW table (PS_DM_EMPL_HIST_VW_1), and used the...
I actually just got it going a few seconds ago. Seems that Crystal requires that all tables referenced in SQL Expressions (at least in my application) must be referenced in the Database Expert. I added another instance of the PS_DM_EMPL_HIST_VW table (PS_DM_EMPL_HIST_VW_1), and used the...
What I'm looking to do there (if it's not obvious) is find the previous record by date, so that I can select based on the value of a field in that previous record - I need to find all records coded with a particular value, where the previous record was coded with a different value. I could do...
To be clear - that error message is coming up when I try to save the SQL Expression. I've also tested the SQL code itself in another SQL tool, and it works fine.
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.