Download presentation
Presentation is loading. Please wait.
Published byChastity Gibbs Modified over 8 years ago
1
What’s New In Denali - TSQL David Ballantyne
2
Who am I ? Dave@clearskysql.co.uk @davebally www.sqlblogcasts.com/blogs/sqlandthelike Kent.Net/SqlServer User Group Founder o Next meeting 3 rd October for SqlRelay o #KentNetSqlUserGroup
3
Overview Deprecation o What have we lost ? o What is going to break? CTP 1 o Sequencing o Paging o Throw CTP 3 o OVER Clause Enhancements – Windowing o Analytic functions (LAG, LEAD, FIRST_VALUE and LAST_VALUE) o Formatting / Parsing functions
4
Deprecation ? “deprecation is a status applied to software features to indicate that they should be avoided, typically because they have been superseded” Removed from next version Removed from a future version BOL Reference o “SQL Server Database Engine Backward Compatibility” o http://msdn.microsoft.com/en-us/library/ms143532(v=SQL.110).aspx
5
Whats going to break ? *= and =* Removed XML Endpoints (SOAP) Removed New keywords o NEXT o WITHIN FASTFIRSTROW Removed
6
Compatibility Issues Soundex changes o Lloyd and Scott o Any stored value can be wrong Row count message for failed DML statements o Sent to client side o Used to be -1 incorrectly, now will be Zero
7
For future Next Release o Result sets from triggers o SET ROWCOUNT with DML Unspecified o Column alias with = and quotes, ' string_alias' = expression o Not ending TSQL statements with ; o SQL Profiler - Use extended events o SET ANSI options ( defined as on ) o SET FMTONLY ON – Replaced with metadata discovery
8
On with the Code Demo Demo…….
9
Metadata discovery Replacement for “SET FORMATONLY ON” Discovery is Limited to first result set EXEC WITH RESULT SETS o Overrides the result set definitions from a procedure o Column Name o Data Type o Can define multi result sets Undeclared parameters
10
Sequences Database wide Identity Developer Can Define o Min Value o Max Value o Starting Value o Cyclable / Non Cyclable o Incrementing value Not transaction integral o Like Identity, can leave gaps
11
Paging Extension to ORDER BY clause o OFFSET X ROWS o FETCH NEXT Y ROWS ONLY FETCH { FIRST | NEXT } { integer_constant | fetch_row_count_expression } { ROW | ROWS } ONLY o FIRST and NEXT are synonyms and are provided for ANSI compatibility. o ROW and ROWS are synonyms and are provided for ANSI compatibility.
12
Throw Used to : o Raise an error o Rethrow an error from TRY CATCH THROW,, o Arbitrary ErroNumber and State, no meaningi o ErrorNumber must be >= 50,000 Honors XACT_ABORT Lost ‘printf’ style message formatting
13
OVER Clause True sliding window o Aggregate relative to current row o Partition by is a fixed window Window defined by o Current Row o Preceding X Rows o Following X Rows Aggregations can be by o Range o Rows
14
Analytics LAG / LEAD o Get a value from X rows ahead or behind current row FIRST_VALUE / LAST VALUE o Get a value from the First or Last Row in the partition CUME_DIST o Cumulative distribution,relative position of a row within a partition PERCENT_RANK o Calculates the relative rank of the row, from 0 to 1 PERCENT_DISC o Returns a value at the specified percentile in the result set PERCENTILE_CONT
15
Formatting / Parsing FORMAT o Return a formatted string PARSE o Convert ‘Culture’ senstive values (DateTime / Money) TRY_PARSE o Like PARSE but returns NULL on error TRY_CONVERT o Like CONVERT but returns NULL on error DATETIMEFROMPARTS o Assemble a date/time type from constituent values CONCAT o String concatentation
16
Logical Functions CHOOSE o CHOOSE(I,v1,v2….) o Using an index from 1 IIF o Inline IF o IIF(Expression,WhenTrue,WhenFalse)
17
Anything else ? FileTables o Links File system folders and SqlServer tables Full text search enhancements o Search documents for properties (Title / Author) o Customizable NEAR, number of terms between search terms Semantic search o Extract key phrases to match similar meaning documents
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.