There are times when retrieving data for complex business requirement requires you to temporarily store one or more results sets for a short period of time. Typically these temporary tables are stored in the scope of the current connection, but they may also need to be available across multiple connections. More »
The DBA Team are back, ready to save another DBA. In this episode, a rogue DBA sabotages the backups, can Robyn Page, Steve Jones, Grant Fritchey, and Phil Factor find the solution? Save the backups...save the business. More »
Every day, out in the various online forums devoted to SQL Server, and on Twitter, the same types of questions come up repeatedly: Why is this query running slowly? Why is SQL Server ignoring my index? Why does this query run quickly sometimes and slowly at others? My response is the same in each case: have you looked at the execution plan? More »
Intersect with your favorite Microsoft experts in Orlando, Florida April 13-16, 2014 at this year’s most exciting tech conference: DEVintersection.com. Register with the discount code "RedSimple" for $50 off your registration. More »
I had a recent run in with collation problems and it got me started reading about them. As I read... More »
Question of the Day
Today's Question (by Andy Warren):
You arrive at work to find an urgent request in your queue: Create a table for Questions that will contain the question title, date it was last changed, and some kind of approval column. Need it before the 9 am stand up so we can discuss with the team.
Springing into action, you start by running the following:
CREATE TABLE Questions
, QuestionTitle VARCHAR(100)
, datechanged DATETIME
, IsApproved BIT DEFAULT 0
CREATE TRIGGER updateQuestions ON dbo.Questions
SET Q.datechanged = GETUTCDATE()
FROM inserted i
INNER JOIN dbo.Questions Q
ON I.QuestionID = q.QuestionID
INSERT INTO Questions
, 'Select me!'
INSERT INTO Questions
, 'Tables and Columns, Oh My'
You're about to test updates and work on performance (you haven't added any indexes yet) when the gong rings for the stand up.
You attend the meeting, everyone admires your table design, and you let them know you'll email when you've completed your testing a few minutes after the meeting ends. You return to your cube and pick up where you left off by writing and executing this statement:
SET IsApproved = 0
WHERE QuestionID IN ( 1, 2 )
The query appears to affect a total of three rows and returns an error message. You are able to fix it two different ways. You immediately think "self, this would be a great question of the day!" and add it to your todo list to write it up.
Which of the following is true? (select 5)
Think you know the answer? Click here, and find out if you are right.
We keep track of your score to give you bragging rights against your peers.
This question is worth
2 points in this category: Triggers.
We'd love to give you credit for your own question and answer.
To submit a QOTD, simply log in to the
SQL Server Execution Plans shows you what's going on behind the scenes in SQL Server. They can provide you with a wealth of information on how your queries are being executed by SQL Server, including: Which indexes are being used, and where no indexes are being used at all. How the data is being retrieved, and joined, from the tables defined in your query. How aggregations in GROUP BY queries are put together. Grab your copy today from Amazon!
Yesterday's Question of the Day
(by Steve Jones):
What version of SQL Server is being released today?
Answer: SQL Server 2014
Despite the day, SQL Server 2014 is being released for general availability today.
INSERT INTO with HierarchyID
- Hi all,
I feel like this should be an easy question to find the answer to, but google searching yielded no...
group columns to one row
- I have a table with the following columns
Iam trying to get the...
- Okay, a topic that has NOTHING to do with SQL . . .
Came across [url=http://www.sqlservercentral.com/Forums/Topic447796-4-1.aspx]this link[/url] describing the SSC point scoring descriptions,...
Today's Random Word!
When you woke up today, or logged-onto Opera Forums, you may have had a dream, a thought, a scene...
DBAs happiest people at work
is it really true??
This newsletter was sent to you because you signed up at SQLServerCentral.com.
Feel free to forward this to any colleagues that you think might be interested.
If you have received this email from a colleague, you can register to receive it here.