SQL RNNR

Blog Post

SQL Server Select – Back to Basics

Of all the fundamental concepts within SQL Server, nothing is potentially more basic and fundamental than the often overlooked Select statement.
Related Posts:

Changing Default Logs Directory - Back to Basics...

2016-04-02

3 reads

Blog Post

SQL Agent Job Schedules

Many moons ago, I posted a script to help report on the human friendly scheduling information for SSRS subscriptions. You...

2016-04-12 (first published: )

2,591 reads

Blog Post

SQL Agent Job Schedules

SQL Agent job schedules should be easy to read for humans if for nothing else than the fact that you have to provide this information to the auditors from...

2016-03-29

3 reads

Blog Post

The Virginia Tour 2016

Three days of presentations in Richmond Virginia. From Naked SQL to Wheel of Doom - there is a wide breadth of knowledge to be shared.
Related Posts:

An Experiment with Deadlocks...

2016-03-11

Blogs

A New Word: Ecstatic Shock

By

ecstatic shock – n. a surge of energy upon catching a glimpse from someone...

The CDO’s Playbook for AI Driven Decision Making

By

The New Arena of Leadership The role of the Chief Data Officer is no...

sp_snapshot – The easy way to take database snapshots of one or more databases – V3.0

By

Presenting you with an updated version of our sp_snapshot procedure, allowing you to easily...

Read the latest Blogs

Forums

Who am I?

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Who am I?

Find Invalid Objects in SQL Server

By Nisarg Upadhyay

Comments posted to this topic are about the item Find Invalid Objects in SQL...

Lessons from the Postmark-MCP Backdoor

By dbakevlar

Comments posted to this topic are about the item Lessons from the Postmark-MCP Backdoor

Visit the forum

Question of the Day

Who am I?

If I want to track which login called a stored procedure and use the value in an audit, what function can I use to replace the xxx below?

create procedure AddNewCustomer
  @customername varchar(200)
AS
BEGIN
    DECLARE @added VARCHAR(100)
    SELECT @added = xxx

    IF @customername IS NOT NULL
      INSERT dbo.Customer
      (
          CustomerName,
          AddedBy 
      )
      VALUES
      (@customername, @added)
END

See possible answers