Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Latest Blog Posts

Max() function in SQL Server

Max():- This function gives the maximum value of the selected column

Syntax:-

Select Max (col1) from table_name


In this article, we are going to use the following table for the examples:-

CREATE TABLE [dbo]. [Employee](
[Empid] [Int] IDENTITY (1, 1) NOT NULL Primary key,
[EmpNumber] [nvarchar](50) NOT NULL,
[EmpFirstName] [nvarchar](150)…

Read more

0 comments, 81 reads

Posted in Vivek's SQL Notes on 13 August 2014

RTRIM() function in SQL Server

RTRIM():-This function is used to get the string after the removal of all trailing blanks.

Syntax:-

RTRIM ( character_expression )

For example:-

Select RTRIM('Vivek Johari  ')

Result:-


Vivek Johari (without blank spaces on Right side)


Read more

0 comments, 85 reads

Posted in Vivek's SQL Notes on 13 August 2014

AND and OR Operator in Sql Server

And & Or:- These Operators are used to further filter the recordset return by SQL queries when more than one conditions are specified. In case of "AND" all the conditions must be true and in case of "OR" any of the condition must be true.
In this article, we are…

Read more

0 comments, 77 reads

Posted in Vivek's SQL Notes on 13 August 2014

T-SQL Tuesday #57: SQL Family and Community

Well, here it is again. The second Tuesday of the month, which means that it’s T-SQL Tuesday. T-SQL Tuesday… that wonderful monthly blogging party started by Adam Machanic (Blog | @AdamMachanic). The intent is to get the entire SQL Community together on a monthly basis to blog about…

Read more

0 comments, 115 reads

Posted in A Discussion of SQL Server-Related Topics on 13 August 2014

Building a Virtual Machine within Azure (IaSS) – Improvements !

Those Dev’s/UX designers out there at Microsoft seems to be pretty busy as they releasing back to back updates to windows azure portal over the last couple of months.

I had to create a VM in Azure to do some testing, and this time I decided to try out the… Read more

0 comments, 4,444 reads

Posted in SQLSailor.com on 12 August 2014

MS14-044–Security Alert for SQL Server

I just saw this, but you should be aware. There’s a potential Denial of Service/Elevation of Privilege bug in SQL Server. Here’s the bulletin:

MS14-044

There are QFE and GDR patches for versions since 2008, but you need to read carefully to determine which one to install on your systems. Read more

0 comments, 73 reads

Posted in The Voice of the DBA on 12 August 2014

Modern Data Warehousing Presentation

I will be presenting the session “Modern Data Warehousing” tomorrow (Wednesday, August 13th) at the Central New Jersey SQL User Group at 6:30pm.  The abstract for my session is below.  I hope you can make it!

Modern Data Warehousing

The traditional data warehouse has served us well for many years,… Read more

0 comments, 121 reads

Posted in James Serra's Blog on 12 August 2014

T-SQL Tuesday #57 – SQL Family and Community

Look at that, it is once again that time of the month that has come to be known as TSQL Tuesday.  TSQL Tuesday is a recurring blog party that occurs on the second Tuesday (most generally) of the month.  This event was the brainchild of Adam Machanic (Blog |… Read more

1 comments, 84 reads

Posted in SQL RNNR on 12 August 2014

Snippet Alert: Useful dates (eom, bom, etc)

Common date values you may need to reference that you may not want to write from scratch each time.

language-sql  
$CARET$declare @Date date = getdate()
select  
    previous_month_bom =    dateadd(month, datediff(month, 0, @Date) - 1, 0) --previous_month_bom
    ,previous_month_eom =   dateadd(day, -1, dateadd(month, datediff(month, 0, @Date), 0)) -- previous_month_eom 
    ,bom =                  dateadd(month,…

Read more

0 comments, 87 reads

Posted in BIT Barbarian on 12 August 2014

Generate Random Date With Starting Point

If you want to create sample random samples when dealing with date calculations to test your results, you can easily create a start and end point of randomly created dates.

This is a snippet I've saved for reuse:

language-sql

DATEADD(day, (ABS(CHECKSUM(NEWID())) % $Days Seed Value$), '$MinDate$')  

This should let you… Read more

0 comments, 80 reads

Posted in BIT Barbarian on 12 August 2014

T-SQL Tuesday #57: SQL Family

This month’s T-SQL Tuesday topic is SQL Family and is brought to us by Jeffrey Verheul (b/t). It’s an amazing topic, but a difficult one for me to put into words. SQL Family is a lot of things, but at its base it is a group… Read more

1 comments, 83 reads

Posted in SQLStudies on 12 August 2014

T-SQL Tuesday #57–SQL Family and Community

It’s T-SQL Tuesday time again. After missing two months with my sabbatical, I’m back.

The topic this month is hosted by Jeffrey Verheul and it is SQL Family and Community. That’s a topic near and dear to my heart, and I’m glad to participate this month. Jeffrey asks: How… Read more

2 comments, 65 reads

Posted in The Voice of the DBA on 12 August 2014

Experts Perspective Webcast: Wait Watchers – Gain Performance Increases Fast

Following in the footsteps of such greats community leaders as Brent Ozar and Kevin Kline I have the opportunity, nay privilege of hosting the “Experts Perspective” webcast series. The only difference being for the next event which is held this week on 14th August 2014 that I won’t be hosting… Read more

0 comments, 72 reads

Posted in Richard Douglas on 12 August 2014

SUM() function in SQL Server

Sum():- This function is used to get the sum of values of the specified numeric column.

 Syntax:-

 Select Sum (column_name) from tablename


Example:-

In this article, we are going to use the following table for the examples:-

CREATE TABLE [dbo]. [Employee](
[Empid] [Int] IDENTITY (1, 1) NOT NULL Primary…

Read more

0 comments, 95 reads

Posted in Vivek's SQL Notes on 12 August 2014

Round() function in SQL Server

Round():-This function is used to round a numeric field to the number of decimals specified.

Syntax:-

    ROUND ( numeric_expression , length [ ,function ]

numeric_expression :-Expression of the exact numeric or approximate numeric data type category, except for the bit data type.

length:- Optional.Must be an expression…

Read more

0 comments, 78 reads

Posted in Vivek's SQL Notes on 12 August 2014

Except command in SQL Server

This function returns the distinct values from the left query that are not also found on the right query. For Except command, below basic rules must be followed.

  1. The number and the order of the columns must be the same in all queries.
  2. The data types must be compatible.

Syntax

Read more

0 comments, 79 reads

Posted in Vivek's SQL Notes on 12 August 2014

SQL Server – Aborted Online Index Operation & Observed Elevated Values for PWAIT_MD_RELATION_CACHE and MD_LAZYCACHE_RWLOCK Wait Types

Last week on one of our production servers, we’ve encountered a strange issue which is relatively new (only applicable for SQL Server 2012 and 2014 versions). Based on the symptoms observed and doing a quick Bing search found we encountered a product bug! I observed multiple SPIDs, around 300+ running…

Read more

0 comments, 92 reads

Posted in SqlServerZest.com - SQL in simple style on 12 August 2014

Speaking In Kansas City At #SQLSatKC

On Saturday, September 13th, I’ll be presenting my 10 Ways To Abuse T-SQL session in Kansas City. If you haven’t seen this one before, here’s your chance! This is always a fun one, and always draws good feedback, even when I run out of time – which happens every single… Read more

0 comments, 68 reads

Posted in RealSQLGuy - Helping You To Become A SQL Hero on 11 August 2014

Building The SQLSaturday Orlando Marketing Plan-Part 33

More notes, hopefully not repeating any from previous posts!

  • Karla has used the chart showing registration growth as a way to reinforce to sponsors that we’re on track for solid attendance. I suspect it also carries with it the impression that we’re engaged in trying to drive the number up,…

Read more

0 comments, 82 reads

Posted in SQLAndy on 11 August 2014

The Murder train chugs into Raleigh

You know, these 1 hour sessions that are at most SQL Saturdays are just too short sometimes – you just get going and bang! The times up. There’s only so much material that can be presented in just one hour. Recognizing this, last year my friend Jason Brimhall and I… Read more

0 comments, 89 reads

Posted in A Discussion of SQL Server-Related Topics on 11 August 2014

Newer posts

Older posts