This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
SQL SERVER - Fix: Error 130: Cannot perform an aggregate function on an expression containing an aggregate or a subquery

SQL SERVER – Fix: Error 130: Cannot perform an aggregate function on an expression containing an aggregate or a subquery

May 16, 2007
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Function, SQL Scripts, SQL Sub Query

Error 130 says you cannot perform an aggregate function on an expression containing an aggregate, like AVG(COUNT()). A derived table gets around it.

Read More
SQL SERVER - Binary Sequence Generator - Truth Table Generator

SQL SERVER – Binary Sequence Generator – Truth Table Generator

May 15, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Utility

A script that builds a 512 row truth table with its decimal value and binary sequence, using CROSS JOINs on a bit table. Add or remove joins to resize it.

Read More
A tear-off desk calendar with its first and last pages of the month held apart by two brass paperweights.

SQL SERVER – Query to Find First and Last Day of Current Month – Date Function

May 13, 2007
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Server, SQL Utility

One query to find the First and Last Day of Current Month in SQL Server, plus the last day of the previous month and the first day of the next.

Read More
SQL SERVER - UDF - Function to Parse AlphaNumeric Characters from String

SQL SERVER – UDF – Function to Parse AlphaNumeric Characters from String

May 13, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL String

UDF_ParseAlphaChars keeps only the alphanumeric characters in a string and strips everything else using PATINDEX and STUFF. A handy function, with a test.

Read More
SQL SERVER - Creating Comma Separate Values List from Table - UDF - SP

SQL SERVER – Creating Comma Separate Values List from Table – UDF – SP

May 6, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts

Three ways to build a Comma Separate Values List from a table: COALESCE, a smart SELECT, or a cursor. Written for SQL Server 2005 with VARCHAR(MAX).

Read More
SQL SERVER - UDF - Function to Convert List to Table

SQL SERVER – UDF – Function to Convert List to Table

May 6, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts

A UDF, udf_List2Table, to convert list to table with any delimiter you choose. Written for SQL Server 2005 with VARCHAR(MAX), and easy to adapt for 2000.

Read More
SQL SERVER - UDF - User Defined Function to Find Weekdays Between Two Dates

SQL SERVER – UDF – User Defined Function to Find Weekdays Between Two Dates

May 5, 2007
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Utility

A user defined function that returns the number of weekdays between two dates, skipping Saturday and Sunday. It was written by Alexander Chigrik.

Read More
Previous 1 … 46 47 48 49 50 51 52 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com