In this issue

Featured Contents

Editorial

Featured Script

 
 advertisement
 
SQL Monitor Get your priorities straight with SQL Monitor
“SQL Monitor gives me the ability to quickly see what my priorities should be, and delivers the information I need to make the right decisions,” Aaron Kolysko, DBA. Start monitoring with a free trial.
 
SQL Toolbelt Want to work faster with SQL Server?
If you want to work faster try out the SQL Toolbelt. "The SQL Toolbelt provides tools that database developers as well as DBAs should not live without." William Van Orden. Download the SQL Toolbelt here.
 
SQL Backup Pro Get compressed, verified, secure SQL server backups
Use SQL Backup Pro's automated scheduling to get faster, smaller backups. Then verify your restores using DBCC CHECKDB in one easy, automated process. Download a free trial now.

In This Issue

Data Mining Introduction Part 4: The Naive Bayes Algorithm

This chapter explains the Naïve Bayes algorithm. How does it works, what information is displayed. More »


Managing SQL Server Statistics

Accurate statistics about the data held in tables are used to provide the best execution strategy for SQL queries. but if the statistics don't accurately reflect the current contents of the table you'll get a poorly-performing query. How do you find out if statistics are correct, and what can you do if the automatic update of statistics isn't right for the way a table is used? More »


Editorial - Modeling the Earth

Whether you agree with the science of climate change or not, the ability to work on a project like this one from Microsoft Research would be cool. The issue of carbon pollution and the potential impact on our world is huge. If we accept that global climate predictions of problems are true, we may severely impact world economies with the changes that some people have suggested. If we discount the problems and they turn out to be true, we may end up in an even worse position. It's also entirely possible that climate changes are natural cycles of the planet and we have no need, or possibility, to alter the way the world is evolving.

No matter what your position, it seems the Microsoft Research isn't trying to make a stand for either position, but rather attempting to clear the technical hurdles that would allow other groups to compare and debate about their models with regards to any global issue. Their goal isn't to push users in a direction, but give governments or other organizations tools they can use to either consider future actions, or react to new data or information that can be added to a model. There's a short interview from CNN with one of the researchers.

As I browse through the list of projects around the world at the various Microsoft Research facilities, it's an interesting mix of somewhat practical ideas with pure research into areas that may never become projects. One thing is clear, and that's much of this work involves large amount of data. Quite a few of the projects themselves deal with data issues, from searching to visualization to analytics. I have to think a few of them will influence or impact SQL Server over the next decade in some way.

» Join the debate, and respond to today's editorial on the forums


The Voice of the DBA Podcasts

We publish three versions of the podcast each day for you to enjoy.

Everyday Jones

The podcast feeds are available at sqlservercentral.mevio.com. Comments are definitely appreciated and wanted, and you can get feeds from there. Overall RSS Feed: or now on iTunes!

Today's podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music. Support this great duo at www.everydayjones.com.

You can also follow Steve Jones on Twitter:

» To submit an article, rant or editorial, log in to the Contribution Center


Question of the Day

Today's Question:

Below are two tables. What will be the count of rows returned by all 5 queries?

CREATE TABLE TableA
(
  ID INT
, Country VARCHAR(20)
)
;
GO
CREATE TABLE TableB
(
  ID INT
, Country VARCHAR(20)
)
;
GO
INSERT TableA SELECT 1, 'India';
INSERT TableA SELECT 1, 'US';
INSERT TableB SELECT 1, 'India';
INSERT TableB SELECT 1, 'US';
GO
select COUNT(*)
 from TableA 
  join TableB
   on TableA.ID = TableB.ID 
;
select COUNT(*)
 from TableA 
  left join TableB
   on TableA.ID = TableB.ID 
;
select COUNT(*)
 from TableA 
  right join TableB 
   on TableA.ID = TableB.ID 
;
select COUNT(*) 
 from TableA 
  full join TableB 
   on TableA.ID = TableB.ID 
;
select COUNT(*)
 from TableA,TableB
;
GO
DROP TABLE TableA;
DROP TABLE TableB;

Think you know the answer? Click here, and find out if you are right.

This question is worth 1 point in this category: T-SQL. We keep track of your score to give you bragging rights against your peers.

We'd love to give you credit for your own question and answer. To submit a QOD, simply log in to Contribution Center.

SQL Server 2012 T-SQL Recipes: A Problem-Solution Approach

SQL Server 2012 T-SQL Recipes is an example-based guide to the Transact-SQL language that is at the core of SQL Server 2012. It provides ready-to-implement solutions to common programming and database administration tasks. Learn to create databases, insert and update data, generate reports, secure your data, and more. Tasks and their solutions are broken down into a problem/solution format that is quick and easy to read so that you can get the job done fast when the pressure is on. Get your copy from Amazon today.


Yesterday's Question of the Day

How many different kinds of payload types for endpoints can you create in SQL Server 2012?

Answer: 3 - TSQL, Service Broker, and Database Mirroring endpoints

Explanation: You can create three payload types in SQL Server 2012: TSQL, Service Broker, and Database Mirroring endpoints. SOAP endpoints were removed in SQL Server 2012.

Ref: http://msdn.microsoft.com/en-us/library/ms181591.aspx

» Discuss this question and answer on the forums

SQL Server Hardware will provide the fundamental knowledge and resources you need to make intelligent decisions about choice, and optimal installation and configuration, of SQL Server hardware, operating system and the SQL Server RDBMS.

Pick up your copy of this great book from MVP Glenn Berry at Amazon today.


Featured Script

Search for an object across multiple databases on a server.

There are other options available like Sql search from Red Gate. Here's a simple script to search for table(s) containing a particular keyword. You can easily extend it to other type of objects by changing the Xtype. More »


Database Pros Who Need Your Help!

Here's a few of the new posts today on the forums. To see more, visit the forums.

SQL Server 2005 : Administering

PBM on Sql Server 2005 ? - Hi All, I have a few critical sql 2005 production servers and I have been asked to try implement policies on...

SQL Server 2005 : Business Intelligence

Use of MDX in SSAS - I have a database in sql 2008.Normally I see all data in database engine in form of tables.Now can I...

working with ssas in sql 2008 - The thing is ,started working with SSAS in sql 2008 recently.when i see examples or tutorials they are all basd...

simple web based reporting - I’m looking for a simple web based tool that can be used to generate tabular reports. Our application has a...

SSIS 2008 Package design - Hi All, I have a requirement where i need to copy around 70 tables from oracle database to Sql server 2008...

SQL Server 7,2000 : Administration

view the data from the sysmail_sentitems and sysmail_unsentitems and sysmail_faileditems without giving sysadmin role MSDB databasse - sysmail_sentitems sysmail_unsentitems sysmail_faileditems these are the views in msdb and without giving sysadmin role MSDB databasse, how to access the data???? Plzz help...

SQL Server 2008 : SQL Server 2008 - General

Automatically connect to new data source in SSRS 2008 - Hi, I have lots of reports created using the version SSRS 2008 and the Data Source is ORACLE. All the reports...

What is pivoting - What is pivoting? Por example: "An attribute of a dimension is not a good candidate for a nonclustered index key. Attributes are...

Combine data from 2 tables and insert in another table - I have following 3 table definition with data [code="sql"] SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [voucherDr]( [srno] [int] IDENTITY(1,1) NOT NULL, [vouchertype] [nvarchar](50) NULL, [voucherprefix]...

LOB and OLTP - Hi Guys, I have see people talking about relational databases as OLTP but now I have started to ear people talk...

DBCC CHECKDB Failing - Hi, We are running DBCC CHECKDB WITH ALL_ERRORMSGS. After couple of minutes, the execution fails, sql service crashes and we get the...

SQL server:warning when editing or changing schema. - In our production sql server we have so many important databases. I have created two login 'admin'(has all permission) and...

If statement in combination with case statement - Hi, I have 3 categories ie Voice, Data, SMS. I have a list of case statements that I currently run based on...

Database Query - Hi, I have couple of questions related to sql server, though I googled it, did not get any definite answer. I...

SQL Server 2008 : T-SQL (SS2K8)

How To Split The Data...Using The Stored Procedure... - Hi.. I Want to Spliting the Data for The Following Table. Using The Stored Procedure.... [code="sql"] Create Table Source (Owner_Name varchar(100),SeatNo Varchar(100)) insert into...

Urgent Query help needed- calculate one field based on other field in SELECT statment - Hi Friends, I have reporting TSQL query- in this query within the select statement I have 2 fields 1) Age (working...

Query help needed - Like a Pivot with generic headings? - [code="sql"]CREATE TABLE [dbo].[mike_inventory]( [itemid] [int] NULL, [location] [varchar](50) NULL[/code] [code="sql"]insert into mike_inventory values (10131,'Row A') insert into mike_inventory values (10131,'Row B') insert into mike_inventory values...

Question about query hint nolock - Hi people, I have a question about nolock. I work in a company that there is a rule: all select query...

Exclude weekends from DateDiff - Dear Friends, I need an urgent help- "How to Exclude Weekends from DateDiff function?" Kind Regards Dhananjay

Passing Multiple Values As Parameters to get Multiple Columns with Comma Seperation(MSSQL) - Create procedure temp ( @MID smallint ) as Begin select TranID, [MonthValue]=(CASE WHEN @MID=1 THEN Jan WHEN @MID=2 THEN Feb WHEN @MID=3 THEN Mar WHEN @MID=4 THEN...

SQL Server 2008 : SQL Server Newbies

Eager Spool - Dear All I am deleting rows from huge table. I am doing it in the batch of 1000 rows. This tables...

MSSQL Sql Not working or partially working - Hi All and thanks in advanced. I Have in my MSSQL Database a Table named TIME_OFF_CODES , in where I have the...

How do I modify this query to search for the keywords that are only two words apart? - How do I modify this query to search for the keywords that are only two words apart? select id, SubjectText from...

SQL Server 2008 : Security (SS2K8)

Stored Procedures Execute Permissions - My global office programmed all our stored procedures and it contains a lot of create/delete temp tables, truncate tables, update,...

SQL Server 2008 : SQL Server 2008 Administration

Simple Replication Question - I am doing some testing with Replication, I have not used much replication before. I have set up a Subscription that...

Rebuilding All Indices - Hello Everyone I hope that everyone is having a very nice weekend. I am working to create a maintenance plan. I am...

multiple instances of sqlserver different dns alias - Hi , I have installed named instances sqlserver2005 express and sqlserver2012 on the same Windows 2008 server Virtual machine ,configured sqlserver2012...

Transactional replication issues - Hello There, I am new to this forum, Could anyone help me with this questions please. I am working in retail industry and...

Create DML trigger for single table in SQL 2008 and send email alert to group - Hi, i have a requirement to Create DML trigger for single table ( check for any updates ) in SQL 2008 and send...

SQL Server Jobs, status, duration running, step - Hello, I need a help to pull information about SQL Server Agent jobs running on multiple instaces. (I am using Powershell) I...

Reporting Services : Reporting Services

SSRS expressions to get part of a string - Hi, I need to write expression in my report to get the characters between "_" and "-". I have two columns in my...