T-SQL: Using the HAVING clause

Here is a quick differentiation between the "WHERE" clause and the "HAVING" clause within an SQL Query. Below is a basic query that will generate a list of the Customers based upon the number of orders they have placed. select count(order_no) as Orders, slcust_no from windows_enquiry where order_no >0 group by slcust_no order by orders … Continue reading T-SQL: Using the HAVING clause

Advertisements

T-SQL: Aggregate Functions; Date Functions; and Group By Statement Woes

When combining Aggregate Functions with Date / Time functions within an SQL Query, you may run into errors relating to the "Group By" statement, such as: "Column is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause" "Invalid Column Name" "Each GROUP BY expression must … Continue reading T-SQL: Aggregate Functions; Date Functions; and Group By Statement Woes

SQL Server File Locations for Default Instances

Each Instance of SQL Server has its own set of executable files (sqlservr.exe) and data files. The file locations for the default instance are different depending upon the version installed. Essentially, this is to allow multiple versions of SQL Server to happily co-existing on the same server. The table below lists the default file locations … Continue reading SQL Server File Locations for Default Instances

XAMPP: Using MySQLDump to Backup MySQL on Windows Server 2003 and Windows 7

I couldn’t find anything specific for Backing up the MySQL Databases within XAMPP. There certainly isn’t a pre-configured routine available. In addition, MySQL Workbench (unlike its predecessor MySQL Administrator) does not provide any automated backup facility. So, I decided to explore the use of “MySQLDump”, a command line routine that can be inserted into a … Continue reading XAMPP: Using MySQLDump to Backup MySQL on Windows Server 2003 and Windows 7

Fitting USB3 into a DELL PowerEdge R510 Server

USB3 is not supported natively within Windows Server 2008 (or Windows 7), and therefore Dell has always seemed reluctant to fit USB3 hardware into its Servers. To make matters worse, most USB3 cards require some sort of SATA Power from the main board, and Dell does not provide these connectors inside the chassis either. So, … Continue reading Fitting USB3 into a DELL PowerEdge R510 Server

Sage Payroll: No Updates were installed

Occasionally, you may find that Sage Payroll "Software Update" will continue to prompt for an update that has been installed previously. After hitting "Install Now", you get a further notification that "No Updates Were Installed". The next time you start payroll, it will repeat the whole process again! Fixing this is easy enough. Just delete … Continue reading Sage Payroll: No Updates were installed