First Query/400 is no SQL!
You only want the name (DTNM) to be displayed only for the first occurrence?
If so you can solve the problem in composition with the OLAP Ranking
function ROW_NUMBER()
You may try the following statement:
With x as (Select RowNumber() Over(Partition By DTNM Order By DTNM,
REPSETNAME, REPNAME) Counter,
a.*
from YourTable a)
select Case When Counter = 1 then DTNM else '' End,
RepSetName, RepName
from x
Order By Dtnm, RepsetName, RepName;
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
-----Ursprüngliche Nachricht-----
Von: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von fbocch2595@xxxxxxx
Gesendet: Friday, 15.3 2013 20:40
An: midrange-l@xxxxxxxxxxxx
Betreff: SQL break ?
Hi Folks, when I run this statement;
SELECT RDDTNM, RDRSET, RDRPTN FROM REPRD ORDER BY rddtnm I get the
screen below but how can I remove the duplicate names and only show one name
for every report set? I know it's doable with wrkqry but I'd like to use
SQL.
Thanks, Frank
DTNM REPORT SET NAME REPORT NAME
ALEX KAPILF ALLITARB4 ALLITARB4
ANDREW LAJR C34TIPPFZ2 C34TIPPFZ2
ANDREW LAJR X12CVMSF X12CVMSF
ANN MCKE P08RATRF P08RATRF
ANN MCKE C36TIPPF C36TIPPF
ANN MCKE D75LEINF D75LEINF
ANN MCKE P88MAILF P88MAILF
ANN MCKE QSYSPRTX QSYSPRTX
ANN MCKE X24RCVMF X24RCVMF
ANN MCKE P09DUPLF P09DUPLF
ANNE MULDEG C01CAXF C01CAXF
ANNE MULDEG C01DETF C01DETF
ANNE MULDEG C03EMPLF C03EMPLF
ANNE MULDEG C12EMPLF C12EMPLF
ANNE MULDEG C17LOSSF C17LOSSF
ANNE MULDEG C23CLEXF C23CLEXF
ANNE MULDEG C23CLSSF C23CLSSF
ANNE MULDEG C25NODTF C25NODTF
ANNE MULDEG C35TIPPF C35TIPPF
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.