When using Table hint the candidate list don't work
Powlin
Posts: 42 Bronze 3
When using this syntax
SELECT * FROM TableName WITH (NOLOCK) WHERE
it work fine
but if I use this syntax (omiting the optional WITH)
SELECT * FROM TableName (NOLOCK) WHERE
It won't display the fields of TableName.
I'm using SQL Prompt 3.9.1.104 and SQL Query Analyser (SQL 2000)
SELECT * FROM TableName WITH (NOLOCK) WHERE
it work fine
but if I use this syntax (omiting the optional WITH)
SELECT * FROM TableName (NOLOCK) WHERE
It won't display the fields of TableName.
I'm using SQL Prompt 3.9.1.104 and SQL Query Analyser (SQL 2000)
Comments
Does this issue occur with all databases? I attempted to recreate this issue using the same version of SQL Prompt on Northwind and the intellisense appropriately popped up after typing
USE [Northwind]
SELECT * FROM [dbo].[Categories] c (NOLOCK) WHERE
Can you try this syntax on other databases?
Thanks to Powlin's steps we have now identified this as a bug with SQL Prompt 3.
The following syntax will fail to suggest the correct candidates after WHERE
SELECT * FROM [dbo].[Categories] (NOLOCK) WHERE
However, the following will still work correctly.
SELECT * FROM [dbo].[Categories] WITH (NOLOCK) WHERE
SELECT * FROM [dbo].[Categories] c (NOLOCK) WHERE
The bug tracking code for this is SP-1457