Derived Column

Technical Article

RE: Find second highest

  • Reply

quote: ...but SQL Server doesn't like it... I know. Annoying, isn't it, that you can't use a variable in the TOP clause...you have to use sp_executesql: DECLARE @n INT DECALRE @sql NVARCHAR(2000) SET @n = 76 SET @sql = N'select top 1 salary from (select top ' + @n + ' employeeId from employee order […]

You rated this post out of 5. Change rating

2003-07-08

Blogs

Monday Monitor Tip: Compliance Checking for Old Versions

By

A customer recently wanted to know if any of their instances were too old...

Making Legend Order Match Segment Order in a Power BI Stacked Column Chart

By

A reader of one of my previous posts pointed out that the legend order...

The Only Valid Test of a Backup is a Restore

By

Please, let me reiterate: The only valid test of a backup is a restore....

Read the latest Blogs

Forums

7 sept, scheduled book

By philip.scott

Comments posted to this topic are about the item 7 sept, scheduled book

7 sept, schedlued article

By philip.scott

Comments posted to this topic are about the item 7 sept, schedlued article

6 sept, published book

By philip.scott

Comments posted to this topic are about the item 6 sept, published book

Visit the forum

Question of the Day

Azure Data Lake Storage Gen 2

Azure Data Lake Storage Gen 2 is built on ...?

See possible answers