[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: SQR-USERS Digest - 10 Jul 2002 to 11 Jul 2002 (#2002-165)
- Subject: Re: SQR-USERS Digest - 10 Jul 2002 to 11 Jul 2002 (#2002-165)
- From: Robert Foster <robert.foster@RADIOLOGY.MSU.EDU>
- Date: Fri, 12 Jul 2002 13:04:54 -0400
- Organization: Mid-Michigan MRI, Inc.
- References: <200207120600.g6C60HC12478@list.iex.net>
Srini,
The "order" clause in your sql must match the sort order you are looking
for in the output and this will effect your "on break" commands.
The following:
> ORDER BY OFFC_STATE,D.RMF_REGION,OFFC_NAME,OFCR_LAST_NAME,CTH_CASE_CAT
doesn't seem to match what you are trying to do with:
State
Region
District
Officer
Offenders
unless I'm not interpreting the field names correctly.
If you have to select and display data in two different ways in the same
report then write another function to do the other similar query and
use:
do first_query
do second_query
If you use the same tables and fields in both queries, just with a
different "order by", then you will have to use different alias names
for the tables since sqr doesn't allow duplicate names in the same sqr
file/program.
in first query:
> FROM OIMST.TAMASTER A,OIMST.TPRELMAST D,TPOFFICE,TPOFFICER,TPCASE_CAT_HIST E
in second query:
> FROM OIMST.TAMASTER AA, OIMST.TPRELMAST DD, TPOFFICE OO, TPOFFICER OF,
>TPCASE_CAT_HIST EE
Bob.
===
Bob Foster
I/S Coordinator
Mid-Michigan MRI, Inc.
Direct Line: (517) 364-2673
mailto:rkf@radiology.msu.edu