T24 function/query to select distinct records
- assiddiqui
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 128
- Thank you received: 0
11 years 5 months ago #15407
by assiddiqui
T24 function/query to select distinct records was created by assiddiqui
Can someone tell that, is there any function, statement or query in T24 to select distinct records?
Please Log in or Create an account to join the conversation.
- jpb
-
- Offline
- Moderator
-
- retired . . . ¯\_(ツ)_/¯
Less
More
- Posts: 2859
- Thank you received: 650
11 years 5 months ago #15409
by jpb
Replied by jpb on topic T24 function/query to select distinct records
Depending on your needs you can use the SAVING UNIQUE clause, e.g.
SELECT FBNK.CUSTOMER SAVING UNIQUE RESIDENCE BY RESIDENCE
SAVE-LIST ResidenceCountry
SAVING
Use with SELECT, SSELECT to create a list containing field values instead of record IDs. If you have field values that are also record IDs in another file, this is useful. The syntax in SELECT or SSELECT sentences is as follows:
SAVING [ UNIQUE ] field
The UNIQUE keyword omits duplicate values in the saved field from the select list.
If you specify multiple SAVING clauses in a SELECT or SSELECT sentence, the entire value of each field becomes an element in the select list. Value marks separate multiple values, subvalue marks separate subvalues.
SELECT FBNK.CUSTOMER SAVING UNIQUE RESIDENCE BY RESIDENCE
SAVE-LIST ResidenceCountry
SAVING
Use with SELECT, SSELECT to create a list containing field values instead of record IDs. If you have field values that are also record IDs in another file, this is useful. The syntax in SELECT or SSELECT sentences is as follows:
SAVING [ UNIQUE ] field
The UNIQUE keyword omits duplicate values in the saved field from the select list.
If you specify multiple SAVING clauses in a SELECT or SSELECT sentence, the entire value of each field becomes an element in the select list. Value marks separate multiple values, subvalue marks separate subvalues.
Please Log in or Create an account to join the conversation.
- assiddiqui
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 128
- Thank you received: 0
11 years 4 months ago #15507
by assiddiqui
Replied by assiddiqui on topic T24 function/query to select distinct records
Thanks for your comments. How could i use SAVING UNIQUE clause in an ENQUIRY..?
Please Log in or Create an account to join the conversation.
- jpb
-
- Offline
- Moderator
-
- retired . . . ¯\_(ツ)_/¯
Less
More
- Posts: 2859
- Thank you received: 650
11 years 4 months ago #15508
by jpb
Replied by jpb on topic T24 function/query to select distinct records
You can use it e.g. in a BUILD.ROUTINE that returns an active selectionlist to the enquiry.
Please Log in or Create an account to join the conversation.
Time to create page: 0.033 seconds