HomeActive Query BuilderIs there a way to add derived table by means of code.

Is there a way to add derived table by means of code.


Is there a way to add derived table by means of code.

For example

Dim mySubQuery as new ActiverBuilder.SubQuery(Me.QueryBuilder1.SubQueries(0),Me.QueryBuilder,Nothing)

Me.QueryBuilder1.SubQueries.Add(mySubQuery )


This way is not working.

Is it possible?
Bernardino Jaramillo | email
July 19 2007, 07:21 PM
To add a subquery you can use following method:

queryBuilder1.ActiveSubQuery.ActiveUnionSubquery.AddFromExpression("(select Title from HumanResources.Employee) q1", "q1");

The alias ("q1") in the first parameter is obligatory.
The second parameter can be null or empty string. If specified, it will override the alias in the first parameter.
Eugeny Starkov | email
1 week, 3 days since original post
This topic is closed