SQL Prompt 7

Applying casing options

You can use SQL Prompt to change the case of keywords (eg SELECT), built-in functions (eg COUNT()), and built-in data types (eg int) in a SQL script.

For example, the following SQL:

declare @dateOnly datetime
set @dateOnly = cast(floor(cast(getdate() as float)) as datetime)

can be modified to:

DECLARE @dateOnly datetime
SET @dateOnly = Cast(Floor(Cast(GetDate() AS float)) AS datetime)

To specify the casing you want to use:

  1. On the SQL Prompt menu, click Options.
  2. Under Format, select Case.
  3. Use the drop-down menus to select the case to use for keywords, functions and data types:

To apply casing options:

  1. Open the script you want to modify in a SQL Server Management Studio query window.
  2. If required, select a portion of SQL in the script that you want to apply casing options to.
  3. On the SQL Prompt menu, click Apply Casing Options.

    You can also hold Ctrl and press B then U to apply casing options.


Didn't find what you were looking for?