Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
More from the grouping
Message
From
15/09/2010 17:01:36
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01481344
Message ID:
01481366
Views:
15
>
>SELECT TOP 10 Event.RO_No,
>Min(Event.DateTime) AS LastUpdate,
>min(Ro.FirstName) as FirstName
> FROM Event
>inner join RO on Event.Ro_No = RO.Ro_No
> WHERE Event.Event_DateTime>'SomDate' GROUP BY Event.RO_No
> ORDER BY MIN(Event.Datetime) 
>and not exists(select 1 from Event E where E.DateTim < ='SomeDate' and E.Ro_No = RO.Ro_NO)
It is that I have dozens of lines in the main SQL, not just the FirstName. So, I need to find a way to keep the sub SQL as is and collect everything I need after in the main SQL.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform