HomeActive Query Builder - Query analysis and modificationProgrammatic modification of SQL queriesHow to insert DISTINCT keyword into a query

2.8. How to insert DISTINCT keyword into a query

Use the following code to insert DISTINCT keyword into a query:

SQLSubQuerySelectExpression selexpr = queryBuilder1.ActiveSubQuery.ActiveUnionSubquery.QueryAST;
selexpr.SelectMode = new SQLSubQuerySelectModeDistinct(queryBuilder1.SQLContext);
queryBuilder1.ActiveSubQuery.ActiveUnionSubquery.NotifySQLUpdated();

This page was: Helpful | Not Helpful