× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.