I would like to know if there's an equivalent of SQL's Select Distinct/Select Group By in Cspro Logic?
Greg informed me months ago how to delete under conditions in Cspro Logic.
Why i need this?
I've a radio button list where enumerators must enter informations/data for each choice in a roster. Some choices may require to enter information in
several rows. Before leaving the roster i would like to have insurance that all related data have been entered.
Since the radio button list come from an array, i already know row number. So if i can compare this with the count select distinct equivalent, i can force enumerators to enter all related data.
C++ already have this, when Cspro support C/C++ or Sqluery supporting Records, items, this will be very easy.
Here's the solution under C++.
Code: Select all
void printDistinct(int arr[], int n)
{
// Pick all elements one by one
for (int i=0; i<n; i++)
{
// Check if the picked element is already printed
int j;
for (j=0; j<i; j++)
if (arr[i] == arr[j])
break;
// If not printed earlier, then print it
if (i == j)
cout << arr[i] << " ";
}
}
Thanks in advance for support.