User Profile
Collapse
-
Thanks for helping me produce the query that was originally required. I've been asked to tweak the report by itemising calls by username, for all users who have made telephone calls totalling over 15.00, rather than producing a report grouping and totalling the cost by username. I thought it was a simple case of removing the 'GROUP BY' line or removing 'SUM' from the select line, but different combinations aren't getting me anywhere and I'm a bit... -
-
I'm actually using SQL Server 2005, which from what I've read has got better email functionality than previous versions of SQL.
Sorry I've been posting in the wrong forum. Doing a quick search I saw a few SQL questions posted in this Access forum and assumed this was the forum for such posts. I didn't see a SQL forum. Thanks for not flaming me, as I know some sites can be quite militant about such things.Leave a comment:
-
Thanks for your help guys. That worked a treat. Just need to do some research on how to automate the creation of that report and email it to a user every week. I was thinking of something along the lines of creating a text .sql osql file, a scheduled task and using our own SMTP utility. However it might be easier creating a SQL job and I think SQL has its own in-built email function from a quick search of Help. Just don't have the permissions to...Leave a comment:
-
SQL SUM HAVING Problem
Hi,
I'm trying to write a query, which produces a list of users, whose telephone call costs total over 15.00 for the month, but I'm having difficulty. Here's my query;
I've tried a few different variations of this, but I'm not...Code:SELECT userid, username, SUM(netamt) FROM EMNCommon HAVING (SUM(netamt) >= '15.0000') AND (transdate > GETDATE() - 30) GROUP BY username
No activity results to display
Show More
Leave a comment: