John wrote:
Can LLBLGen do a subquery in the select statement of SQL like the following SQL Statement?
Select
Institution_ID = a.Institution_ID,
Name = a.Name,
'Number Due' = (
Select Count(*)
From RequiredAgencyWebForm r
Where r.Institution_ID = a.Institution_ID )
From
Agency a
Order by
a.Name
If so, how?
Thanks,
John H.
Yes, you can. You'll want to look into the "dyanamic lists" functionality included in the framework.
Dynamic Lists allow you to construct in code what amounts to a custom SQL SELECT statement. The great thing about them is that you're able to add in SQL expressions like what you're looking for above as in "Number Due" = ().
You can find more info in the documentation at:
Using the generated code::<scenario>::Using the typed list and typed view classes::Creating dynamic lists
And
Using the generated code::Field expressions and aggregates