Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 sth wrong with my query

Author  Topic 

vux
Starting Member

45 Posts

Posted - 2004-07-28 : 06:22:26
sth is wrong with the FROM - do you guys know what? (year has to be entered by the user) - thx for your help!

SELECT [Overview].[Country], dbo_tblCountryGroup.Name, Sum(IIf(IsNull([NumberOfDays]),1,[NumberofDays])) AS NbOfDays, [Overview].[TravelYear]
FROM Overview, dbo_tblCountryGroup
WHERE dbo_tblCountryGroup.Seq = SELECT (CountryGroup FROM dbo_tblCountryGroupCountry WHERE dbo_tblCountryGroupCountry.Name=Overview.Country) AND [Overview].[TravelYear]=Year
GROUP BY dbo_tblCountryGroup.Name, [Overview].[TravelYear];

vux
Starting Member

45 Posts

Posted - 2004-07-28 : 07:28:18
I just saw

must be WHERE...IN...SELECT instead of =
Go to Top of Page
   

- Advertisement -