Srinivas Sampath

  • Interests: Enterprise Application Architecture, Patterns, SQL Server 2005 and .NET

SQLServerCentral Article

Recursive Queries in SQL Server 2005

Part 2 of new T-SQL enhancements from Srinivas Sampath. SQL Server 2005 contains a number of enhancements designed to allow you to write more powerful queries while keeping the code structured in a way that makes development and understanding it easier. Building on his first look at Common Table Expressions, Srinivas now looks at recursive queries with CTEs.

4.61 (31)

You rated this post out of 5. Change rating

2008-04-18 (first published: )

94,328 reads

SQLServerCentral Article

An Introduction to the Service Broker

One of the more interesting new features in SQL Server 2005 is the Service Broker. It's not something to help you manage your financial future, nor is it some new program that handles all the instances and their accounts. It's a message queue and SQL Server MVP Srinivas Sampath brings us a look at this new feature with some code to get you going.

4.62 (21)

You rated this post out of 5. Change rating

2007-12-14 (first published: )

32,432 reads

SQLServerCentral Article

Common Table Expressions in SQL Server 2005

The next evoution of T-SQL, which will be released in SQL Server 2005, contains a number of enhancements designed to allow you to write more powerful queries while keeping the code structured in a way that makes development and understanding it easier. Coming ever so closer to the SQL-99 specification with Common Table Expressions, new author Srinivas Sampath brings us an introduction to this new way of writing complex queries.

4.74 (38)

You rated this post out of 5. Change rating

2007-09-22 (first published: )

50,883 reads

SQLServerCentral Article

An Introduction to the Service Broker Part 2

One of the less exciting, but perhaps very powerful new features in SQL Server 2005, the Service Broker is an asynchronous communications method. MVP Srinivas Sampath brings us the second part of his series looking at what you can accomplish with a practical example.

4.75 (4)

You rated this post out of 5. Change rating

2005-08-30

13,105 reads

Blogs

Query to Email….Well Formatted Email

By

When I get alerts from SQL Server I want it to do three things...

Announcements from the Microsoft Fabric Community Conference

By

A ton of new features for Microsoft Fabric were announced at the Microsoft Fabric Community...

Why Your SQL Server Backups Aren’t Enough

By

SQL Server backups are database insurance – you don’t really appreciate them until disaster...

Read the latest Blogs

Forums

Runnng SSIS package from SQL Agent Job with Excel manipulation

By DanH1231

Good Day SQL Guru's, I have a problem I am hoping someone can give...

How to backup a specific table to an external folder?

By water490

Hi everyone My SS db has a bunch of tables that I don't use. ...

Manual AG Alter problems

By Brandie Tarvin

All, We have an environment where connecting to servers in SSMS requires an extra...

Visit the forum

Question of the Day

The Long String

I have a table (dbo.beer) with this data:

BeerIDBeerNamebrewerbeerdescription
-------------------------------------------------------------------------------------------------------------------------------------
1BecksInterbrewBeck's is a German-style pilsner beer known for its golden color, full-bodied taste, and a crisp, clean finish with floral and fruity hop aromas, brewed according to the German purity law
2Fat TireNew BelgiumToasty malt, gentle sweetness, flash of fresh hop bitterness. The malt and hops are perfectly balanced.
3Mac n JacksMac & Jack's BreweryThis beer erupts with a floral, hoppy taste, followed by a well rounded malty middle, finishing with a nicely organic hop flavor. Locally sourced two row grain and a blend of specialty malts give our amber its rich taste.
4Alaskan AmberAlaskan BrewingAlaskan Brewing Amber Ale is an "alt" style beer, meaning it's fermented slowly and at colder temperatures, resulting in a well-balanced, richly malty, and long-lasting flavor profile with a clean, pleasing aftertaste.
8KirinKirin BrewingKirin Ichiban is a Lager-type beer, which means it is fermented at low temperatures and offers a light and refreshing texture with a smooth and balanced flavor.
Here is the DDL For the table:
CREATE TABLE [dbo].[Beer]
(
[BeerID] [int] NOT NULL IDENTITY(1, 1),
[BeerName] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[brewer] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[beerdescription] [varchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
I run this code:
SET TEXTSIZE 20;
SELECT
  b2.BeerName
, b2.beerdescription
FROM dbo.Beer AS b2;
GO
What is returned?  

See possible answers