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
Four small pipettes rest in white cups while a hand drips amber liquid from a fifth pipette into a glass blending bottle.

Weighted Scores: Ranking Products by Several Columns at Once

February 10, 2008
Pinal Dave
SQL Tips and Tricks
Mathematics, Ranking Functions, SQL Order By, Temp Table

Adding rating to units sold ranks by whichever column is biggest. Scale first, weigh second, and keep the weights in a table anyone can read.

Read More
Gouache painting: two identical wall rails each carry the same five horseshoes graded from small to large, plus two bare vermilion hooks

NULL Sort Order: Put Missing Values Where Readers Expect

February 8, 2008
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts

NULL sort order uses a CASE bucket to put missing values last. Keep a stable tie breaker and preserve the original score.

Read More
Gouache painting: a garden bench seen from the front has five slat positions

CHAR: Invalid Character Codes Return NULL

February 7, 2008
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Server

CHAR constructs a character instead of printing an integer. Preserve byte-code inputs and distinguish an ordinary space from missing output.

Read More
A paper ribbon of comma separated values feeding into a machine and coming out as a tidy table.

SQL SERVER – Import CSV File Into SQL Server Using Bulk Insert – Load Comma Delimited File Into SQL Server

February 6, 2008
Pinal Dave
SQL Tips and Tricks
CSV, SQL Scripts, SQL Utility

How to import CSV file data into SQL Server with BULK INSERT: create a table, point to the comma delimited file and load every row in a few quick steps.

Read More
SQL SERVER - Simple Example of WHILE Loop with BREAK and CONTINUE

SQL SERVER – Simple Example of WHILE Loop with BREAK and CONTINUE

February 4, 2008
Pinal Dave
SQL Tips and Tricks
SQL Scripts

A very simple example of WHILE Loop with BREAK and CONTINUE, plus a Books Online sample that uses a SELECT query in the WHILE condition.

Read More
An amber warning lamp standing alone on wet concrete in a dark plant room

SQL SERVER – FIX : ERROR : Cannot find template file for new query (C:\Program Files\Microsoft SQL Server\90\Tools\ Binn\VSShell\Common7\ IDE\sqlworkbenchprojectitems\Sql\ SQLFile.sql)

February 3, 2008
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Server, Starting SQL

Cannot find template file for new query means SSMS lost a small local file. Where it lives, how to restore it, and what to check next.

Read More
SQL SERVER - Find All The User Defined Functions (UDF) in a Database

SQL SERVER – Find All The User Defined Functions (UDF) in a Database

February 2, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts

A very simple script that lists all the User Defined Functions in a database, with schema name and type, by reading sys.objects in SQL Server.

Read More
Previous 1 … 517 518 519 520 521 522 523 … 570 Next
  • Books
  • Testimonials
  • Privacy Policy

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