How can we help you today? How can we help you today?

When using Table hint the candidate list don't work

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)
Powlin
0

Comments

2 comments

  • Chris Auckland
    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 Auckland
    0
  • Chris Auckland
    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 Auckland
    0

Add comment

Please sign in to leave a comment.