What are the challenges you face when working across database platforms? Take the survey
Options

SELECT alias capitalization issue.

njahnckenjahncke Posts: 23
edited February 4, 2010 6:32PM in SQL Prompt Previous Versions
SQL PROMPT VERSION: v4.0.3.12
SSMS VERSION: v10.0.2531.0
OS VERSION: Windows 7 Enterprise x86

PROBLEM: Aliases in the SELECT portion of a statement are not capitalized appropriately. Capitalization of aliases in the WHERE and other portions of a statement is performed as expected.

STEPS TO REPRODUCE:
Note: The following instructions assume at least "." is configured to insert suggested statements and that identifier brackets are enabled.

1) Enter the following code.
SELECT

FROM
	[sys].[tables] T
	JOIN [sys].[columns] C ON
		[T].[object_id] = [C].[object_id]
WHERE

2) Place your cursor on line 8, hit TAB, "t" and "." Notice the inserted "[T]."

3) Place your cursor on line 2, hit TAB, "t" and "." Notice the inserted "[t]."

EXPECTED BEHAVIOR:
The "t" inserted during step 3 should be capitalized.

Comments

  • Options
    MikeyCMikeyC Posts: 249 Bronze 3
    I have noticed this as well, but have never nailed it down to just being a problem in the SELECT portion of the statement. Hopefully they will get this fixed in the next release.
  • Options
    MikeyCMikeyC Posts: 249 Bronze 3
    Note: in the above example if you use the alias at line 2 first and leave it lower case, then when you use the alias at line 8 it is inserted as lower case, so the case appears to be coming from the first use of the alias, rather than where it should come from which is the definition of the alias.
  • Options
    You're right; I'd noticed that behavior as well but didn't want to confuse the issue lol... I'm hoping the simpler the problem, the more likely it is to be fixed.
  • Options
    Many thanks for bringing this to our attention. I have logged it as a bug in our tracking system with reference SP-2884. It will be looked at for the next release of SQL Prompt although we have no timescales for this at present.
  • Options
    MikeyCMikeyC Posts: 249 Bronze 3
    It looks like this is fixed in the latest update, thanks!
Sign In or Register to comment.