Today I have two simple T-SQL Puzzle. You can answer them and win USD 25 Gift card. The gift card will be sent in email to winner. You will get choice of Gift Card brand based on your preference and country location. Puzzle 1: What will be the outcome and why? DECLARE @x REAL; SET [...]
Archive for June, 2011
SQL SERVER – Two Puzzles – Answer and Win USD 25 Gift Card
Posted in Pinal Dave, PostADay, SQL, SQL Authority, SQL Puzzle, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, SQLServer, T SQL, Technology on June 30, 2011 | 18 Comments »
SQL SERVER – Find Details for Statistics of Whole Database – DMV – T-SQL Script
Posted in Pinal Dave, PostADay, SQL, SQL Authority, SQL DMV, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology, tagged SQL Statistics, Statistics on June 29, 2011 | 7 Comments »
I was recently asked is there a single script which can provide all the necessary details about statistics for any database. This question made me write following script. I was initially planning to use sp_helpstats command but I remembered that this is marked to be deprecated in future. Again, using DMV is the right thing [...]
SQLAuthority News – Monthly list of Puzzles and Solutions on SQLAuthority.com
Posted in Pinal Dave, PostADay, Readers Contribution, Readers Question, SQL, SQL Authority, SQL Puzzle, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, SQLServer, T SQL, Technology on June 28, 2011 | 2 Comments »
This month has been very interesting month for SQLAuthority.com we had multiple and various puzzles which everybody participated and lots of interesting conversation which we have shared. Let us start in latest puzzles and continue going down. There are few answers also posted on facebook as well. SQL SERVER – Puzzle Involving NULL – Resolve [...]
SQL SERVER – Puzzle Involving NULL – Resolve – Error – Operand data type void type is invalid for sum operator
Posted in Pinal Dave, PostADay, SQL, SQL Authority, SQL Puzzle, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, SQLServer, T SQL, Technology on June 27, 2011 | 34 Comments »
Today is Monday let us start this week with interesting puzzle. Yesterday I had also posted quick question here: SQL SERVER – T-SQL Scripts to Find Maximum between Two Numbers Run following code: SELECT SUM(data) FROM (SELECT NULL AS DATA) t It will throw following error. Msg 8117, Level 16, State 1, Line 1 Operand data [...]
SQL SERVER – T-SQL Scripts to Find Maximum between Two Numbers
Posted in Pinal Dave, PostADay, SQL, SQL Authority, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology on June 26, 2011 | 21 Comments »
There are plenty of the things life one can make it simple. I really believe in the same. I was yesterday traveling for community related activity. On airport while returning I met a SQL Enthusiast. He asked me if there is any simple way to find maximum between two numbers in the SQL Server. I [...]
free community tool
About Pinal Dave
Pinal Dave is a Microsoft Technology Evangelist (Database and BI). He has written over 2000 articles on the subject on his blog at http://blog.sqlauthority.com. Along with 8+ years of hands on experience he holds a Masters of Science degree and a number of certifications, including MCTS, MCDBA and MCAD (.NET). He is co-author of three SQL Server books - SQL Server Programming, SQL Wait Stats and SQL Server Interview Questions and Answers. Prior to joining Microsoft he was awarded Microsoft MVP award for three continuous years for his contribution in community.
Follow @pinaldave Send +Pinal Dave an email at pinal@sqlauthority.com
-
Blog Stats
- 36,185,381 (35 Million+)
Next Office Hours
Books I Authored
SQLAuthority Links
Subscribe to Newsletter
My Homepage
Windows Live Blog
--------------------
Top Downloads
PDF Downloads
Script Downloads
Script Bank
Favorite Scripts
All Scripts - 1
All Scripts - 2
All Scripts - 3
Top Articles
Best Articles
Favorite Articles - 1
Favorite Articles - 2
--------------------
> SQL Interview Q & A <
SQL Coding Standards
SQL FAQ Download
--------------------
Jobs @ SQLAuthority
About Nupur Dave
Nupur Dave loves technology simply because it makes life more convenient. She is devoted to technology because it touches our heart makes our daily lives easier. Among the many technological programs she uses and embraces Windows Live most because she can do lots of things with ease – from photo management to movies; business emails to personal social media connections.
Disclaimer
This is a personal weblog. The opinions expressed here represent my own and not those of my employer. For accuracy and official reference refer to MSDN/ TechNet/ BOL. My employer do not endorse any tools, applications, books, or concepts mentioned on the blog. I have documented my personal experience on this blog.
Categories
- About Me (144)
- Best Practices (143)
- Business Intelligence (36)
- CodeProject (10)
- Data Warehousing (49)
- Database (320)
- DBA (137)
- DMV (13)
- Joes 2 Pros (47)
- MVP (147)
- PASS (14)
- Readers Contribution (110)
- Readers Question (122)
- SharePoint (7)
- Software Development (69)
- SQL Add-On (99)
- SQL Azure (15)
- SQL Backup and Restore (79)
- SQL BOL (11)
- SQL Coding Standards (21)
- SQL Constraint and Keys (57)
- SQL Cursor (28)
- SQL Data Storage (59)
- SQL DateTime (47)
- SQL DMV (22)
- SQL Documentation (299)
- SQL Download (310)
- SQL Error Messages (159)
- SQL Function (161)
- SQL Humor (29)
- SQL Index (155)
- SQL Interview Questions and Answers (134)
- SQL Joins (77)
- SQL Milestone (25)
- SQL Optimization (152)
- SQL PASS (19)
- SQL Performance (340)
- SQL Puzzle (90)
- SQL Security (127)
- SQL Server DBCC (42)
- SQL Server Management Studio (44)
- SQL Service Pack (13)
- SQL Stored Procedure (116)
- SQL String (26)
- SQL System Table (61)
- SQL Trigger (24)
- SQL User Group (57)
- SQL Utility (153)
- SQL View (26)
- SQL Wait Stats (41)
- SQL Wait Types (42)
- SQL White Papers (66)
- SQL XML (12)
- SQLAuthority (629)
- SQL Training (18)
- SQLAuthority Author Visit (141)
- SQLAuthority Book Review (39)
- SQLAuthority News (574)
- SQLAuthority Website Review (42)
- SQLServer (224)
- Tech (1579)
- Pinal Dave (1567)
- SQL Scripts (858)
- Technology (2021)
- PostADay (442)
- SQL (2021)
- SQL Authority (2021)
- SQL Query (2021)
- SQL Server (2021)
- SQL Tips and Tricks (2021)
- T SQL (2021)
- Video (4)
-
Top Posts & Pages
- SQL SERVER - Insert Data From One Table to Another Table - INSERT INTO SELECT - SELECT INTO TABLE
- SQL SERVER - Retrieve Current Date Time in SQL Server CURRENT_TIMESTAMP, GETDATE(), {fn NOW()}
- SQL SERVER - Insert Multiple Records Using One Insert Statement - Use of UNION ALL
- SQL SERVER - Convert Text to Numbers (Integer) - CAST and CONVERT
- SQL SERVER - FIX : ERROR : (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: )
- SQL SERVER - Import CSV File Into SQL Server Using Bulk Insert - Load Comma Delimited File Into SQL Server
- SQL SERVER - How to Rename a Column Name or Table Name
- SQL SERVER - 2005 List All Tables of Database
- SQL Interview Q & A
- SQL SERVER - 2008 - Configure Database Mail - Send Email From SQL Database
- SQL SERVER - Shrinking Truncate Log File - Log Full
- SQL Server Interview Questions and Answers Complete List Download
Top 3 Commenters









