Home Forums SQL Server 2008 SQL Server Newbies New Topic Script file help RE: New Topic Script file help
minimay
Grasshopper
Points: 20
More actions
May 5, 2015 at 2:05 pm
#1795743
nevermind i figured it out
Declare @Julycount int
Set @Julycount= (Select Count(*) From orders Where MONTH(OrderDate) = 7)
print 'The total orders for july is ' + Cast(@JulyCount as varchar)