I get this error when executing my code. What does this mean? I'm using SQL Server Management Server Express.
Msg 102, Level 15, State 1, Line 7
Incorrect syntax near ')'.
declare @start datetime
declare @end datetime
set @start = '2012/01/02'
set @end = '2012/01/06'
SELECT
SUM(VCount) as [Total],
vdate,
(select COUNT(VIP) From (SELECT DISTINCT(VIP) FROM dbo.Visiter)) as [IP3]
FROM dbo.Visiter
where VDate between @start and @end
GROUP BY VDate