Nested select

Posts   
 
    
WouterD
User
Posts: 12
Joined: 10-Mar-2009
# Posted on: 31-Mar-2009 16:17:17   

Hello,

I would like to get the following sql statement:

SELECT  [mmm].[ID], 
[mmm].[Subject], [mmm].[MailDate], 
[mmm].[Marked]
,(select Count(MonitorMailHistory.id) from MonitorMailHistory where MonitorMailHistory.MailMessageID=mmm.id ) as actions
,(select distinct Count(MonitorMailHistory.ruleid) from MonitorMailHistory where MonitorMailHistory.MailMessageID=mmm.id) as rules
from MonitorMailMessage as mmm
WHERE [mmm].[MailboxID] = 37

How can I make with LLBLGen the nested select?

Maybe you can give an example or documentation link?

Thx

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 31-Mar-2009 21:27:40   

The documentation on how to use scalar sub queries is located here

Matt