Stop qualifying column names for updates
Osolage
Posts: 15
Hi,
Every time I write an update statement SQL Prompt fully qualifies the update columns, but I don't want it to. How can I stop this?
For example:
becomes:
I'm used to listing the update columns without qualifying them. Can that be stopped somehow?
Every time I write an update statement SQL Prompt fully qualifies the update columns, but I don't want it to. How can I stop this?
For example:
UPDATE [dbo].[X] SET [TargetValue]
becomes:
UPDATE [dbo].[X] SET [dbo].[X].[TargetValue]
I'm used to listing the update columns without qualifying them. Can that be stopped somehow?
Thanks,
Ra Osolage
Ra Osolage
Comments
I am sorry but there is no specific setting to turn off 'qualify columns' for specific statements.
Enabling 'Qualify column names' will qualify the columns in all statements.
However, I will include this as a feature request and we will review this for our future versions.
Thanks,
Tanya
It really only makes sense to have the columns qualified in places where an expression is allowed. There is no need to qualify the column names in the SET clause of an UPDATE statement, as there is no ambiguity over which column is the target. The same goes for the column list in an INSERT statement. While it appears that it is valid syntax, it does seem unnecessarily verbose.