T24 function/query to select distinct records

  • assiddiqui
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
11 years 5 months ago #15407 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
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • retired . . . ¯\_(ツ)_/¯
More
11 years 5 months ago #15409 by jpb
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.

Please Log in or Create an account to join the conversation.

  • assiddiqui
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
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
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • retired . . . ¯\_(ツ)_/¯
More
11 years 4 months ago #15508 by jpb
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