Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
madlo
Starting Member
41 Posts |
Posted - 2014-11-06 : 10:06:15
|
I have a database with strange table names starting with @For this reason I have to use Select [@Table1].[Column1] from [@Table1]or I will get SQL errors when running itHowever as soon as this is pasted the fact table of the Data Source View via "Edit Named Query" and OK is saved and you open it again the same method via "Edit Name Query it then removes all the "[]" for everything resulting in a sql error if you click on the run button in the same "edit named query window".I have tried to switch to "generic query builder" display but as soon as you go back it goes to your default wizard look display which reformats it.Is there a way to turn off formatting in the Data Source View Fact Table SQL? |
|
gbritton
Master Smack Fu Yak Hacker
2780 Posts |
Posted - 2014-11-06 : 10:19:07
|
Why not:1. change the name of your tables so they don't need quoting2. embed the query in a stored procedure or view and use that instead of the pass-through query. |
|
|
madlo
Starting Member
41 Posts |
Posted - 2014-11-06 : 10:43:02
|
quote: Originally posted by gbritton Why not:1. change the name of your tables so they don't need quoting2. embed the query in a stored procedure or view and use that instead of the pass-through query.
Thanks for you answer1. Not possible since it is an out the box ERP system that uses @ prefix for special purpose 2. Possible yes. But the problem is there is IP involved in viewing the views so they don't want it added to the sql server where everyone who has access to the SQL Server client can see it there. I was trying to find a setting but there isn't none. Also what bugs me is it reformats it from neat format of columns underneath each other in separate row to all just a big paragraph so the reason is also to have neat SQL. |
|
|
madlo
Starting Member
41 Posts |
Posted - 2014-11-06 : 11:26:31
|
I have gotten it to stay on "generic query builder" view so it doesn't reformat when reopening it. Not sure why it didn't default to "generic query builder" before" |
|
|
gbritton
Master Smack Fu Yak Hacker
2780 Posts |
Posted - 2014-11-06 : 11:49:23
|
quote: But the problem is there is IP involved in viewing the views so they don't want it added to the sql server where everyone who has access to the SQL Server client can see it there.
you can control that with permssions. |
|
|
|
|
|