Forum Discussion
Joachim20095
Jun 06, 2024Copper Contributor
SQL-Server Management Studio: deactivate wildcard expansion
Hello everybody, I need to save a view with a table with wildcard, like "SELECT * FROM country". However, the MS SQL-Management Studio automatically expands the the wildcard with the fields o...
olafhelper
Jun 07, 2024Bronze Contributor
how do I deactivate the automatic expanson of this wildcard?
Joachim20095 , you can't and this simply because that's not the way a database engine like SQL Server works.
You create a view, db engine compiles the SQL for it to get a fix definition for it; end of the story.
Changes on the base table don't change anything on the view definition, even if you recompile the view.
The wanted behaviour don't make sense; how should client applications handle the unknown view definition?
And table changes doesn't come form heaven, the are man-made and that man can change the view as well, if required.
Joachim20095
Jun 07, 2024Copper Contributor
olafhelperthank you very much, but that's not correct. It has worked for years in the past when I used another SQL-Editor (which is no longer available). And it works, for instance, when I use "SELECT * FROM country" in the code.
It's one of the popular features of my software that users may add their own datafields and work with them, for instance when creating Word-Documents (see https://a-jur.de/spezielle.htm).
I am convinced that it's just a little checkbox in the depths of the SQL-Management Studio that controls this behaviour - I just cant' spot it.
Best regards from Germany!
Joachim20095