Technical Article

Script to sort by columns that may include NULLs

If you sort by in ASC order by column that may include NULLs and empty strings ( if type is varchar), the records with nulls will always appear before any others.This script will show how to chagne this pattern and move all records with NULLs to the bottom of your recordset

You rated this post out of 5. Change rating

2002-05-23

209 reads

Technical Article

Retrieve default value for parameter in procedure

This procedure will return DEFAULT value for the parameter in the stored procedure. Usage: Use pubs go declare @Value varchar(30) exec _GetParamDefault 'random_password','@password_type',@value OUTPUT SELECT @VALUE Also accepts different versions, by default, if not specified, first version info retrieved. exec _GetParamDefault 'random_password;2','@password_type',@value

You rated this post out of 5. Change rating

2002-05-10

320 reads

Blogs

Can You See Who Forced a Plan

By

I had an excellent group of people in Gothenburg Sweden when I taught there...

Monday Monitor Tips–Finding CUs for My Instance

By

How can I quickly get a CU patch for a system that’s out of...

Why Data Analysts Love PostgreSQL (and You Will Too!)

By

Data analysis is all about wrangling massive datasets. To do that efficiently, you need...

Read the latest Blogs

Forums

GIT Configuration and Automated Release for Azure Data Factory

By Sucharita Das

Comments posted to this topic are about the item GIT Configuration and Automated Release...

workaround for problems that cant be try caught

By stan

hi a peer of mine recalls an error in an edi app that often...

How to commit transaction log during a large ETL process

By Lord Slaagh

Hello SSC! First, I would like to thank everyone who has responded to my...

Visit the forum

Question of the Day

Trigger Order III

I have created these triggers in SQL Server 2022:

CREATE TRIGGER triggertest_tri_1 ON dbo.triggertest FOR INSERT
AS
PRINT 'one'
GO
CREATE TRIGGER triggertest_tri_2 ON dbo.triggertest FOR INSERT
AS
PRINT 'two'
GO
I want to be sure that the trigger with "1" runs first. I decide to run this:
EXEC sp_settriggerorder@triggername = 'triggertest_tri_1', @order = 'first'
What happens?

See possible answers