duplicate query on concatenated field
I have a concatenated query field (query name: datqry_SampleNumber) that is based on data from 3 different tables to create a unique SampleCode as follows (SampleCode: IIf([tbl_Carcass.SampleNumber]="-999","-999","NPT-" & [tbl_SurveyInfo.SurveyYear*] & "-" & [datqry_TransectData.Project_Code] & "-" & [tbl_Carcass.SampleNumber]) for SampleNumber values > 0001 (-999 is a placeholder indicating no SampleNumber assigned). Note, SurveyYear* is a calculated field based on Survey Date. So, since SampleCode needs to be unique to each sample, I am trying to build a duplicate query, based on the aforementioned query, to identify duplicate SampleCodes so they can be relabeled and archived w/ a unique qualifier. The criteria for the duplicate query operation is as follows In (SELECT [SampleCode] FROM [datqry_SampleNumber] As Tmp GROUP BY [SampleCode] HAVING Count(*)>1 ) However, I get the following error message..."Your query does not include the specified expression 'SampleCode' as part of an aggregate function." I've looked into aggregate functions and have tried various ways to GROUP BY using the individual data fields that make up the code but I can't seem to get anything to work. Any ideas on how to tackle this problem? Thank you in advance for your help and suggestions.
Necessity of declaration of function in c and cpp
Calculate window average in tableau
Complexity asymptotic relation (theta, Big O, little o, Big Omega, little omega) between functions
What are TOP_COUNT and TOP_MAXCOUNT in BigQuery?
marklogic need advise for approach to aggregate documents
multiply(num) aggregate function in postgresql
Binding the Result of an Aggregate Function to a Projected Variable
tableau aggregate data based on dimension
where clause and aggregate functions
Is there such a thing as a join() aggregate function that concatentates field values at a specific character?
Aggregation of an expression in Django query spanning multiple tables
How to aggregate / roll up percentile measures
A peer-to-peer and privacy-aware data mining/aggregation algorithm: is it possible?
Multiple aggregates in SPARQL
SAP BO XI Desktop Intelligence Aggregate Calculations
Mondrian: Help picking the right aggregator for Measures?