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.
Vack Aged Yak Warrior
530 Posts
SELECT dbo.cicmpy.cmp_name, sum(CASE WHEN datediff(d,q.date, getdate()) <= 30 then AmountTC else 0 end) as 30DaysFROM dbo.QIVAROpenItems q INNER JOIN dbo.cicmpy ON dbo.QIVAROpenItems.DebtorNumber = dbo.cicmpy.debnrgroup by cicmpy.cmp_name
Ifor Aged Yak Warrior
700 Posts
SQLTeam.com Articles via RSS
SQLTeam.com Weblog via RSS
- Advertisement -
Articles
Forums
Blogs
Contact Us
About the Site