[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

[sqr-users] sub-query question




This is a fake query to illustrate my question.

I'm using a sub-query like this:

begin-select
spriden_id,
(select pebempl_pidm from pebempl where pebempl_pidm = spriden_pidm)  &pidm

from spriden
end-select

but I want to wrap the sub-query like this:

begin-select
spriden_id,
(select pebempl_pidm
from pebempl
where pebempl_pidm = spriden_pidm)  &pidm

from spriden
end-select
Why wrap it, you ask?  My sub-query is really long and I don't want to make 
it all one line stretching out to infinity.  In addition, SQR will only 
allow a line to be so long and my sub-query one big line exceeds 
that.  Thus, I want to wrap it.

When writing the above as a SQL query, wrapping is not a problem but when I 
try to wrap it in SQR, though, it is giving me an error:

Error on line 14:
    (SQR 3727) SQL expression not ended, perhaps parentheses not balanced.
from pebempl

It does not like that return after the "select pebempl_pidm".

Yes, I can use a separate procedure instead of the sub-query - I have lots 
of alternatives so don't pass alternative suggestions along, please.

I'm just curious if wrapping the subquery is possible.

Thanks in advance.

Amy Eldridge
Systems Analyst
Miami University (nope, the one in Ohio)

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users