Try this, GROUP BY's are usually more efficient than DISTINCT and produce
the same results.
BEGIN-SELECT
D.ROLEUSER (+1, 15)
F.OPRDEFNDESC
D.ROLENAME (0, 60)
E.CLASSID (0, 100)
F.ACCTLOCK
LET #MYOBJNAME = 1
FROM PSROLEUSER D, PSROLECLASS E, PSOPRDEFN F
WHERE D.ROLENAME = E.ROLENAME
AND E.CLASSID = 'PSADMIN'
AND D.ROLEUSER = F.OPRID
AND F.ACCTLOCK = 0
ORDER BY D.ROLEUSER
GROUP BY D.ROLEUSER, F.OPRDEFNDESC, D.ROLENAME, E.CLASSID, F.ACCTLOCK
end-select
Any questions, please call or email me
Thank you.
Regards,
John
(Embedded image moved to file: pic29972.jpg)
John Harris
Programmer/Analyst
Application Development - Internal
QVC Inc., 1200 Wilson Drive, MC 220, West Chester, PA 19380-4262
Telephone 484-701-3303
Fax 484-701-8437
e-mail jharris@qvc.com
This message may contain information that is privileged or confidential.
This message may contain information that is privileged or confidential. If
you are not the intended recipient, you are hereby notified that any
disclosure, copying, distribution, or use of the information contained
herein is STRICTLY PROHIBITED. If you received this transmission in error,
please immediately contact the sender and destroy the material in its
entirety, whether in electronic or hard copy format.
"Hall, Tara"
<hallt@talgov.com
> To
Ext: <sqr-users@sqrug.org>
Sent by: cc
sqr-users-bounces
+john_harris=qvc. Subject
com@sqrug.org [sqr-users] Distinct in SQR
09/24/2007 01:40
PM
Please respond to
"This list is for
discussion about
the SQR database
reporting
language from
Hyperion
Solutions."
<sqr-users@sqrug.
org>
Hi All,
I'm using the following code in an SQR but it is still not returning
distinct rows. If I used the same code in TOAD, it returns distinct rows
of data:
BEGIN-SELECT DISTINCT
D.ROLEUSER (+1, 15)
F.OPRDEFNDESC
D.ROLENAME (0, 60)
E.CLASSID (0, 100)
F.ACCTLOCK
LET #MYOBJNAME = 1
FROM PSROLEUSER D, PSROLECLASS E, PSOPRDEFN F
WHERE D.ROLENAME = E.ROLENAME
AND E.CLASSID = 'PSADMIN'
AND D.ROLEUSER = F.OPRID
AND F.ACCTLOCK = 0
ORDER BY 1
end-select
Any suggestions?
Thanks,
Tara
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users
Here was a non admissible message part of 'image/jpeg' MIME type. It has been automatically discarded before sending the message to the list.
_______________________________________________ sqr-users mailing list sqr-users@sqrug.org http://www.sqrug.org/mailman/listinfo/sqr-users