 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
Olegon
Joined: 07 Sep 2009 Posts: 40
|
|
Space before table hint |
|
SQL Assistant 4.7.11
MS SQL 2005, MS SQL Server Managment Studio
There is the code:
 |
 |
select * from dbo.Accounts a (nolock) |
When I select the code and do the formatting, I get the following
 |
 |
select
*
from
dbo.Accounts a(nolock) |
This is that I need, but where the space between table alias "a" and table hint "(nolock)"? Why he is deleted?
My rule for "select":
 |
 |
select
... as ...,
... = ...
from
... as ...,
...
join ...
on
... = ... and
...
where
... = ... and
... or
...
group by
...,
...
having
...,
...
order by
...,
... |
|
|
Tue Sep 08, 2009 3:37 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
This is because the syntax is incorrect. You are missing WITH keyword before the hint. Note that using hints without WITH keyword is ok in SQL 2000, partially supported in 2005 and discontinued in 2008
Now, if you want to apply special formatting to a text like WITH (hint here) , you can add your own formatting rule.
 |
 |
WITH (...) |
or something similar
|
|
Tue Sep 08, 2009 8:17 am |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|