Keywords next to character strings
Wyatt70
Posts: 50
I noticed that SQL Prompt handles keywords differenty when they are followed by a character string.
For example, let's say I have the following SQL code in a script:
If I use backspace to remove the space between "exec" and "(@vSQL);", SQL Prompt will convert "exec" to uppercase.
Now try this statement:
If I use backspace to remove the space between "print" and "'in lab_missing';", SQL Prompt does NOT convert "print" to uppercase. I have to position my cursor after the "t" and press the spacebar in order to convert it to uppercase.
Is this by design?
For example, let's say I have the following SQL code in a script:
exec (@vSQL);
If I use backspace to remove the space between "exec" and "(@vSQL);", SQL Prompt will convert "exec" to uppercase.
Now try this statement:
print 'in lab_missing';
If I use backspace to remove the space between "print" and "'in lab_missing';", SQL Prompt does NOT convert "print" to uppercase. I have to position my cursor after the "t" and press the spacebar in order to convert it to uppercase.
Is this by design?
Comments
It seems to work differently in my case. I've got UPPERCASE enabled for reserved keywords, functions, and datdtypes, and I get my commands uppercased immediately, without backspacing or any other keys. I don't know why you're getting a different result.
Here are the settings I am using:
Operating System: Windows XP SP2
SQL Server Version: SQL Server 2005 SP2 (9.0.3054)
Candidates Settings:
All possible Completion Keys are checked: ("Enter", "Tab", "Spacebar", "Dot", "Comma", "Closing bracket", "Parenthesis")
All possible Join Conditions are checked: ("Include matching column names", "Include matching data types")
"Apply case-sensitive sort order" is NOT checked
"Show objects for specified owner or schema" is checked
All checkboxes in Other Objects are checked ("Include variables in the candidate list", "Include system objects in the candidate list")
Style Settings:
"Qualify object names" is checked
"Qualify column names" is NOT checked
"Surround with brackets" is NOT checked
"Insert parentheses for built-in functions and data types" is checked
"Reserved keywords" is set to "Force UPPERCASE"
"Built-in functions" is set to "Force UPPERCASE"
"Built-in data types" is set to "Force lowercase"
Auto Insert Settings:
"Enable TAB to expand columns after SELECT" is checked
"Use new line for each column" is checked
"Insert object definition on ALTER" is checked
"Insert parameters for functions and stored procedures" is checked
"Insert hints for data types" is checked
In the "Automatic Closing Characters" section, the following are checked: ("Parenthesis", "Bracket" and "Single quotation mark")
In the "Automatic Closing Characters" section, the following are NOT checked: ("Double quotation mark" and "Comment mark")
Red Gate Software
Lionel
Red Gate Software