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

wrong candidate list in v3

if i type the following query
---
SELECT
FROM dbo.CONTRACT ORD (NOLOCK)
INNER JOIN dbo.CONTRACTITEM ITM (NOLOCK)
ON ( ORD.CONTRACTNO = ITM.CONTRACTNO )
INNER JOIN dbo.Master MI (NOLOCK)
ON (ITM.masterno = MI.masterno )
WHERE DATEDIFF(DAY, ORD.)
----
the period brings up a candidate list that includes all kinds of choices. in v2, the candidate list would be limited to the columns in the dbo.contract table
jjderoo
0

Comments

2 comments

  • jjderoo
    further experiementing has shown that the behaviour is better once at least one column is named between the SELECT and the FROM
    jjderoo
    0
  • Tilman
    Hi,

    Thanks for the feedback. The more valid your SQL is, the better SQL Prompt should work. So if you don't want to specify your columns at the start, I suggest putting a wildcard ('*') there.

    E.g.

    SELECT *
    FROM dbo.CONTRACT ORD (NOLOCK)
    INNER JOIN dbo.CONTRACTITEM ITM (NOLOCK)
    ON ( ORD.CONTRACTNO = ITM.CONTRACTNO )
    INNER JOIN dbo.Master MI (NOLOCK)
    ON (ITM.masterno = MI.masterno )
    WHERE DATEDIFF(DAY, ORD.)

    You can then also replace that wildcard with the explicit column list, by placing the caret behind it and pressing Tab.

    Regards,

    Tilman
    Tilman
    0

Add comment

Please sign in to leave a comment.