table name prepended to column names in INSERT column list

bstrautinbstrautin Posts: 8 Bronze 2
edited September 21, 2011 6:16AM in SQL Prompt Previous Versions
If the "Qualify column names with table name" option is set, SQL Prompt incorrectly qualifies column names in an INSERT statement's column list.

For example, for table 'Foo' with column 'FooID', if I type
INSERT INTO foo (f[tab]
I get:
INSERT INTO Foo (Foo.FooID
This is invalid SQL. Instead, the code should looke like:
INSERT INTO Foo (FooID

Comments

  • Many thanks for your post.

    When you use the 'Auto-Insert' option SQL Prompt provides this same query works fine.

    For that make sure you have following option selected: SQL prompt 5 --> options --> Inserted Code --> Objects & Statements --> Insert Full Insert statement.

    And after saving the setting above in a new query window type :
    INSERT INTO foo[tab]
    

    and it will insert code and not qualify it with column names.

    Please let me know how you get on with it.
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: [email protected]
Sign In or Register to comment.