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

Re: [sqr-users] Subselect








Thanks a bunch.  I have tried it and it works as shown, however, the
subselect I am trying to do is a "sum" and it looks like SQR doesn't like
that.
i.e.
begin-select
A.DATE
(select sum(amount) from TABLE_X where NAME = 'FRED') &ID

By the way, the reason I'm trying to do this is so that I can ORDER BY
A.DATE, &ID.

I know I could call separate procedures to go and get this information, but
then I am not able to sort the data unless I build some sort of temp table
or views.  I  wanted to be able to just return everything I need in this
one select and sort accordingly and then print.

Any further thoughts?

Christopher Allo
PeopleSoft Specialist
x-3348


                                                                           
             "Larry Roux"                                                  
             <lroux@syr.edu>                                               
             Sent by:                                                   To 
             sqr-users-bounces         <sqr-users@sqrug.org>               
             +callo=hinda.com@                                          cc 
             sqrug.org                                                     
                                                                   Subject 
                                       Re: [sqr-users] Subselect           
             07/07/2004 03:45                                              
             PM                                                            
                                                                           
                                                                           
             Please respond to                                             
             "This list is for                                             
             discussion about                                              
             the SQR database                                              
                 reporting                                                 
               language from                                               
                 Hyperion                                                  
                Solutions."                                                
             <sqr-users@sqrug.                                             
                   org>                                                    
                                                                           
                                                                           




Yes, just put a variable at the end of the subselect - ie

begin-select
A.DATE
(select ID from TABLE_X where NAME = 'FRED') &ID
A.ADDRESS_LINE1
   show ' Date = ' &A.DATE  ' ID = ' &ID
from ADDRESSES A
where A.ADDRESS_TYPE = 'HOME'
end-select








Larry Roux
Syracuse University
lroux@syr.edu

>>> CAllo@hinda.com 07/07/04 16:28 PM >>>




I don't have very detailed information on the begin-select construct and my
question is as follows:  In SQL, you can do "subselects" like

SELECT
Date,
(Select total From Acct Where...),
Name,
......
FROM
......


I am wondering if it is possible to accomplish something of the sort in a
begin-select paragraph?

Christopher Allo
PeopleSoft Specialist
x-3348
This communication is for the exclusive use of addressee and may contain
confidential, proprietary or privileged information which may be used
exclusively for its intended purpose. If you are not the intended
recipient, any use, copying, disclosure, dissemination or distribution is
strictly prohibited.  If you are not the intended recipient, please notify
the sender immediately by return e-mail, delete this communication, and
destroy all copies.


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


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


This communication is for the exclusive use of addressee and may contain
confidential, proprietary or privileged information which may be used
exclusively for its intended purpose. If you are not the intended
recipient, any use, copying, disclosure, dissemination or distribution is
strictly prohibited.  If you are not the intended recipient, please notify
the sender immediately by return e-mail, delete this communication, and
destroy all copies.


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