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 - The procedure attempted to return a status of NULL, which is not allowed. A status of 0 will be returned instead.

SQL SERVER – The procedure attempted to return a status of NULL, which is not allowed. A status of 0 will be returned instead.

April 8, 2013
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Stored Procedure

Why does SQL Server say a procedure attempted to return a status of NULL and returns 0 instead? A reader asked on Facebook, and I explain what it means.

Read More
Gouache painting of a wooden chute carrying a red apple from one crate of green apples into another

How to Pass Stored Procedure Result to Another Procedure in SQL Server

April 7, 2013
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL Stored Procedure, SQL Variable

To pass stored procedure result values from one procedure to another, use an OUTPUT parameter. This post tests RETURN codes, INSERT … EXEC and table-valued parameters on a small order demo. It also shows the errors each method raises and when a function is the better tool.

Read More
A large soap bubble with a smaller one inside, a red bubble wand in a dish.

Temp Table Scope in Nested Procedures and Dynamic SQL

March 30, 2013
Pinal Dave
SQL Tips and Tricks
Dynamic SQL, SQL Stored Procedure, SQL TempDB, Temp Table

Explain temp table scope across nested procedures and dynamic SQL, reproduce missing and duplicate-name errors, and pass rows safely.

Read More
A lone hawthorn tree bent sideways by old winds on a calm day, a red gate below.

Finding Procedures Created With the Wrong SET Options

March 9, 2013
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Server, SQL Stored Procedure

Find procedures with wrong SET options in sys.sql_modules, understand error 1934, and recreate modules with ANSI_NULLS and QUOTED_IDENTIFIER ON.

Read More
A netted fruit cage over blackcurrant bushes, a blackbird perched outside unable to get in.

Safe Dynamic SQL With sp_executesql and QUOTENAME

February 19, 2013
Pinal Dave
SQL Tips and Tricks
Dynamic SQL, SQL Server, SQL Server Security, SQL Stored Procedure

Write safe dynamic SQL with typed value parameters, validated object names, and allowed sort columns, then test hostile input.

Read More
A wall hatch in a kitchen pass with an entire loaded tray being sent through in one movement.

SQL SERVER – Significance of Table Input Parameter to Stored Procedure

January 31, 2013
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL Stored Procedure

Pass a whole table into a stored procedure instead of forming and parsing XML. Here is why a table input parameter to stored procedure saves round trips.

Read More
A sewing machine stitching a long straight seam, a red spool turning on top.

Cursor Options That Matter: LOCAL, FAST_FORWARD and STATIC

November 24, 2012
Pinal Dave
SQL Tips and Tricks
SQL Cursor, SQL Server, SQL Stored Procedure, SQL TempDB

Test SQL Server cursor options, including LOCAL FAST_FORWARD and STATIC, on one loop while measuring time and tempdb cost.

Read More
Previous 1 … 14 15 16 17 18 19 20 … 36 Next
  • Books
  • Testimonials
  • Privacy Policy

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