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
A hand lifts the last dark log from an old firewood bay into a canvas bag already holding dark logs and one pale log.

FIFO Inventory Costing in T-SQL: Matching Sales to Purchase Lots

April 1, 2009
Pinal Dave
SQL Tips and Tricks
Ranking Functions, SQL Joins, SQL Scripts, Temp Table

Which purchase lot paid for which sale? Two running totals and one join answer it, with no cursor and no loop.

Read More
SQL SERVER - Fix : Error : Msg 2714, Level 16, State 6 - There is already an object named '#temp' in the database

SQL SERVER – Fix : Error : Msg 2714, Level 16, State 6 – There is already an object named ‘#temp’ in the database

March 29, 2009
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Scripts, SQL TempDB

Msg 2714 says there is already an object named #temp in the database, even after an IF EXISTS check and DROP. A reader asked why, and here is the answer.

Read More
Sql error dialog.

SQL SERVER – FIX : Error: Msg 15123, Level 16 – The configuration option ‘advance option’ does not exist, or it may be an advanced option.

March 26, 2009
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Scripts, SQL Server Configuration

Msg 15123 says the configuration option does not exist or may be an advanced option. Turn on show advanced options with sp_configure first, then set it.

Read More
SQL query execution in SQL Server Management Studio.

SQL SERVER – Fix : Error : Msg 4621, Level 16, State 10 : Permissions at the server scope can only be granted when the current database is master

March 26, 2009
Pinal Dave
SQL Tips and Tricks
SQL Activity Monitor, SQL Error Messages, SQL Login, SQL Scripts

Msg 4621 says permissions at the server scope can only be granted when the current database is master. Switch to master with USE master and grant again.

Read More
SQL SERVER - 2008 - SCOPE_IDENTITY Bug with Multi Processor Parallel Plan and Solution

SQL SERVER – 2008 – SCOPE_IDENTITY Bug with Multi Processor Parallel Plan and Solution

March 24, 2009
Pinal Dave
SQL Tips and Tricks
Database, SQL Error Messages, SQL Identity, SQL Index, SQL Scripts

SCOPE_IDENTITY can return a wrong value when a query uses a parallel plan on a multi processor server. Run it on one processor or, better, use the OUTPUT clause.

Read More
SQL SERVER - 2008 - Activity Monitor is Empty - Fix Activity Monitor for All Users

SQL SERVER – 2008 – Activity Monitor is Empty – Fix Activity Monitor for All Users

March 22, 2009
Pinal Dave
SQL Tips and Tricks
SQL Activity Monitor, SQL Error Messages, SQL Scripts, SQL Server, SQL Server Security

In SQL Server 2008, Activity Monitor is empty for a user without the right permissions. Here is how to fix Activity Monitor for all users.

Read More
Gouache painting: on a smith's slate bench, one long iron bar lies between two stone blocks

geometry STEquals: Equal Shapes Can Have Different Text

March 20, 2009
Pinal Dave
SQL Tips and Tricks
Spatial Database, SQL Function, SQL Scripts, SQL Server

geometry STEquals compares the represented point set, which can stay the same when its text representation changes. I separate that question from byte-for-byte text identity. Reversing a line does not necessarily change the places it occupies.

Read More
Previous 1 … 288 289 290 291 292 293 294 … 365 Next
  • Books
  • Testimonials
  • Privacy Policy

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