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

Re: ON-BREAK questions



That's pretty scary if the folks training you do that.  Perhaps you need to find better trainers!!

-----Original Message-----
From: Jennifer Wagner 301-827-5467 FAX 301-594-6463
[mailto:WAGNERJ@CDER.FDA.GOV]
Sent: Friday, 13 August 1999 10:51 PM
To: Multiple recipients of list SQR-USERS
Subject: Re: ON-BREAK questions
Sensitivity: Confidential


Hey, I'm still learning!  That is what the folks training me always do
first...add distinct.  So, I assumed it was the thing to do.


>Adding distinct without considering why is definately NOT a good rule
of thumb!!
>More often than not it indicates a problem with your query if you are
getting duplicate rows where not expected.
>
>-----Original Message-----
>From: Jennifer Wagner 301-827-5467 FAX 301-594-6463
>[mailto:WAGNERJ@CDER.FDA.GOV]
>Sent: Friday, 13 August 1999 1:20 AM
>To: Multiple recipients of list SQR-USERS
>Subject: Re: ON-BREAK questions
>Sensitivity: Confidential
>
>
>Off the top of my head, the first thing I always do is add "distinct".
>That's probably not it, but it's a good rule of thumb.  :)
>
>>Good morning, SQRUG!
>>
>>I inherited an SQR to which I had to add a date variable.  The output
>is listing the date twice, and I'm sure it has something to do with
>ON-BREAK.
>>
>>Here's what I have:
>>
>>begin-select
>>Z_PROC_WE_DT        &Z_PROC_WE_DT2 () ON-BREAK Level=1
>!This is the line I added
>>Z_OFFICE_NBR        &NBR2       () ON-BREAK   Level=2 Print = Never
>After = Print-Payroll
>>Z_OFFICE_NBR        &OFFICE2
>>Z_PR_PROC_STATUS    &STATUS2
>>COUNT(*)            &COUNT2
>>FROM [$PS_TABLE]
>[$dyn_where]
>>[$dyn_where_dt]                                                     !I
>added this dynamic statement
>>GROUP BY  Z_OFFICE_NBR, Z_PR_PROC_STATUS, Z_PROC_WE_DT
>>end-select
>>
>>The report output:
>>
>>WE Date      Office       Ignore           Ready         Error
>Completed     Total
>>
>                 26-DEC-1997
>>26-DEC-1997   C0021            0               0             0
>     1          120-FEB-1998
>>20-FEB-1998   C0024            0               0             0
>     1          106-MAR-1998
>>06-MAR-1998   M0222            0               0             0
>     2          228-NOV-1997
>>28-NOV-1997   M8017            0               0             0
>     1          122-AUG-1997
>>22-AUG-1997   S0029            0               0             0
>     2          226-DEC-1997
>>26-DEC-1997   S0029            0               0             0
>     2          2
>>
>>              Table Totals     0               0             0
>     9          9
>>
>>Why am I getting the dates twice? and why is the first occurence of
the
>date pushing into the total column? is this a problem with my ON-BREAK
>logic, or column spacing, or.........?
>>
>>Thanks Much In Advance.
>>
>>~~ JEJ ~~   ;{)
>>
>>__________________________________________
>>$14.95 a month Unlimited Internet Access.
>>Get your first month for $1.00.
>>http://www.surfree.com/promo