Lasso Soft Inc. > Home

-Distinct

Using the -Distinct keyword in an [Inline] causes a -Search or -Findall action to only output MySQL records that contain unique field values for a returned field. This is equivalent to performing a SELECT DISTINCT statement in SQL. Will output the first record containing a unique value only.

  • Syntax
  • Parameters
[Inline: -Search, -Distinct, ...]

[Inline: -FindAll, -Distinct, ...]
Examples

To return only unique records for a specified field:

This example finds all records in the People table of the Contacts database, but only returns records with unique values in the Company field.

[Inline: -Findall, -Database='Contacts', -Table='People',
-ReturnField='Company', -Distinct]
  [Records]
    [Field:'Company']
[/Records] [/Inline]
Result:
Blue World Communications
Tag Link -Distinct Category Database
Type Command Data Source MySQL
Support Preferred Version 6.0
Output Type None Security None
Implementation LCAPI Sets Lasso 7.0, Lasso 6.0

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft