T-SQL Denali St. Louis Day of .Net

394 views
366 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
394
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

T-SQL Denali St. Louis Day of .Net

  1. 1. T-SQL in Denali<br />Kathi Kellenberger<br />Microsoft Corporation<br />
  2. 2. Who am I?<br />Database Technology Specialist based in St. Louis, MO<br />Former DBA and MVP<br />Author of “Beginning T-SQL 2008” (Apress 2009)<br />Co-Author of “Professional SQL Server 2005 Integration Services” (Wrox 2006)<br />Contributor to “SQL Server MVP Deep Dives” (Manning 2009)<br />
  3. 3. My Life…<br />
  4. 4. Agenda<br />Sequence<br />Ad-hoc Query Paging (OFFSET/FETCH)<br />Throw<br />With Results Sets<br />Sys.sp_describe_first_result_set<br />Date/Time Functions<br />Conversion Functions<br />Logical Functions<br />String Functions<br />
  5. 5. Sequence<br />An alternative to Identity<br />Create a Sequence object<br />NEXT VALUE FOR function<br />Caching<br />OVER clause for sorting<br />Needs UPDATE permission<br />
  6. 6. Ad-hoc Query Paging<br />ORDER BY enhancement<br />OFFSET # ROWS<br />FETCH FIRST/NEXT # ROWS ONLY<br />
  7. 7. THROW<br />Raise an exception<br />THROW error_number, message, state<br />Inside CATCH, raises caught error if no params specified<br />Error number does not have to be defined in sys.messages<br />Default severity is 16<br />
  8. 8. WITH RESULT SETS<br />Used with EXECUTE<br />RESULT SETS UNDEFINED<br />RESULT SETS NONE<br />RESULT SETS definition<br />
  9. 9. Sys.sp_decribe_first_result_set<br />Replaces SET FMTONLY ON<br />Returns metadata<br />Stored proc<br />Dynamic SQL<br />Returns error if first result set is undetermined<br />
  10. 10. Date/Time Functions<br />From Parts<br />DATEFROMPARTS<br />DATETIME2FROMPARTS<br />DATETIMEFROMPARTS<br />DATETIMEOFFSETFROMPARTS<br />SMALLDATETIMEFROMPARTS<br />TIMEFROMPARTS <br />EOMONTH <br />
  11. 11. Conversion Functions<br />PARSE<br />TRY_PARSE<br />TRY_CONVERT<br />
  12. 12. Logical Functions<br />IIF<br />CHOOSE<br />Like selecting an item from an array<br />
  13. 13. String Functions<br />CONCAT<br />FORMAT<br />

×