Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

T-SQL Denali St. Louis Day of .Net


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

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 />
  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 />