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

Incorrect expansion of table alias

moffmoff Posts: 34
edited July 31, 2007 1:03PM in SQL Prompt Previous Versions
version 3.5.0.333

If you alias a table as 'ctat', SQL Prompt always expands the snippet ct (create table) even if you scroll down the list to select ctat.

I've reproduced this using the following dummy tables:
SELECT 	* 
FROM	TableA AS ctat
		INNER JOIN 
		TableB AS tb
		ON ct
at this point the cursor is to the right of the 'ct'. The tooltip says "Press TAB to insert snippet". I press ctrl-space and get a list of options, with ct snippet at the top. Using the arrow keys I scroll the highlight bar down two options, to ctat, and press tab. This is what the SQL ends up as:
SELECT 	* 
FROM	TableA AS ctat
		INNER JOIN 
		TableB AS tb
		ON CREATE TABLE 
		   (
		   	-- column_name data_type,...
		   )

I can screenshot this if it would help.

Comments

  • Options
    Thank you for the bug report. I've tried it, and I see what you mean. Do you use TAB as your main insertion key? We suspected people would tend to use ENTER (or for your query, a DOT seems appropriate).

    In a future release, we will likely fix it so when the candidate list is being displayed, then the snippet insertion is disabled.
    Jason Crease
    Red Gate Software
Sign In or Register to comment.