This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
SQL SERVER - SPACE Function Example

SQL SERVER – SPACE Function Example

July 19, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts

Does SQL Server have a SPACE function? Yes. SELECT SPACE(100) returns 100 spaces, and a short example uses it to join last and first names.

Read More
SQL SERVER - CASE Statement in ORDER BY Clause - ORDER BY using Variable

SQL SERVER – CASE Statement in ORDER BY Clause – ORDER BY using Variable

July 17, 2007
Pinal Dave
SQL Performance
SQL Function, SQL Scripts

Stop building ORDER BY strings and running them with EXEC in a stored procedure. I show how a CASE statement in ORDER BY sorts by a variable without dynamic SQL.

Read More
ISDATE function in SQL Server.

SQL SERVER – Validate Field For DATE datatype using function ISDATE()

July 12, 2007
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Server

A CSV import crashed on the date 30/2/2007. Use the ISDATE() function to validate a VARCHAR column in a staging table before moving rows to a DATETIME field.

Read More
SQL SERVER - Result of EXP (Exponential) to the POWER of PI - Functions Explained

SQL SERVER – Result of EXP (Exponential) to the POWER of PI – Functions Explained

July 9, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts

Quick examples of PI(), POWER() and EXP() in SQL Server, and the answer to the title: EXP to the POWER of PI returns 23.1406926327793.

Read More
SQL SERVER - FIX : ERROR Msg 244, Level 16, State 1 - FIX : ERROR Msg 245, Level 16, State 1

SQL SERVER – FIX : ERROR Msg 244, Level 16, State 1 – FIX : ERROR Msg 245, Level 16, State 1

July 8, 2007
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Function, SQL Scripts

Msg 244 and Msg 245 come from converting a value to an incompatible data type, often with CAST or ISNULL. Examples of both, and why ISNULL casts to the first type.

Read More
SQL SERVER - Convert Text to Numbers (Integer) - CAST and CONVERT

SQL SERVER – Convert Text to Numbers (Integer) – CAST and CONVERT

July 7, 2007
Pinal Dave
SQL Interview Questions and Answers
Best Practices, SQL Function, SQL Scripts

How to convert text to integer with CAST and CONVERT, whether they fail on alpha-numeric values (yes), and how to pull only the numbers from a string.

Read More
SQL SERVER - Explanation of WITH ENCRYPTION clause for Stored Procedure and User Defined Functions

SQL SERVER – Explanation of WITH ENCRYPTION clause for Stored Procedure and User Defined Functions

July 1, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Server Encryption, SQL Stored Procedure

Use WITH ENCRYPTION to hide the code of a stored procedure or UDF, but keep a copy of the script. Once encrypted, there is no simple way to decrypt it.

Read More
Previous 1 … 43 44 45 46 47 48 49 … 52 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com