GJBDJC

Sql Distinct Value

Discussion created by GJBDJC on Apr 4, 2017
Latest reply on Apr 7, 2017 by beverly

I would like to set up a portal which shows only unique values from a related table.

 

In my Quality Details table, I store the test results for each sample taken.  A Finished Product Lot may have one or many samples and a given project may have one or many lots.

 

I would like to filter a portal to only show the unique lots of a related project.  I tried the following:

 

ExecuteSQL (

       "SELECT DISTINCT \"FP Lot Number\"

       FROM \"Quality Details\"";

       ""; ""

)

 

FP Lot Number is the field containing lot numbers and the field is a text field (Lot numbers may contain Alpha values: BDA1234)

Quality Details is the table containing FP Lot Numbers.  Anyway, the filter shows nothing, zippo, nada?????

Outcomes