Link to home
Start Free TrialLog in
Avatar of VBBRett
VBBRett

asked on

Something wrong with my query, what am I doing wrong?

There is something wrong with my query, what am I doing wrong?
select	mmatter, mdesc1, 
		tklast + ', ' + tkfirst + ' (' + tkinit + ')' as WA,
		sum(hwacur) as MTD_Billable_hours,
		sum(hwaytd) as YTD_Billable_hours
from df_dwtkmat , df_dwcontrol, matter, timekeep
where matter in (select	distinct  mmatter from timecard
					where ttk='02500'
					and tworkdt between getdate()-30 and getdate())
and rectype=4020
and defvalue=pe
and matter=mmatter
and watty=tkinit
group by mmatter, mdesc1, 
		tklast + ', ' + tkfirst + ' (' + tkinit + ')'
having sum(hwacur) <> 0 or
		sum(hwaytd)<> 0
order by 		mmatter, mdesc1, 
		tklast + ', ' + tkfirst + ' (' + tkinit + ')'

Open in new window

Avatar of sammySeltzer
sammySeltzer
Flag of United States of America image

Well, to be honest with you, we don't know unless you tell us.
What is the error message you're getting?
ASKER CERTIFIED SOLUTION
Avatar of Scott Pletcher
Scott Pletcher
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial