When using Table hint the candidate list don't work

PowlinPowlin Posts: 42 Bronze 3
edited November 13, 2008 10:32AM in SQL Prompt Previous Versions
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)

Comments

  • Thanks for your post.

    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?
    Chris
  • Just an update to this issue:

    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
    Chris
Sign In or Register to comment.