What are the challenges you face when working across database platforms? Take the survey

Invalid object name (red squiggle)

DiginariDiginari Posts: 2
edited November 19, 2015 3:27AM in SQL Prompt
First off, let me apologise if this has been reported before. Also as I have a valid license with support, let me know if there is a better way for me to get help.

Ok, I am using SQL Prompt v.

The Issue I am having is not really a functional one, more of an annoyance. In SSMS if I right click a database and select 'New Query' everything works as expected.

But I have 'a lot' of databases and I tend to just 'New Query' on the server rather than looking for the database. Once the query window opens, I then type 'Use DBNAME'
Perfect, I am not querying this database. However, when I am typing my query I get red squiggly lines on my objects, with the error 'Invalid object name' - worth noting the query then executes successfully.

I've tried to clear the cache and also tried enabling the experimental features 'Automatically refresh suggestions' to no-avail.

Is this a known issue, is this just me ? Hopefully someone can advise.

Many thanks, Jamie


  • Options
    Hi Jamie,

    SQL Prompt doesn't provide the red squiggles, this is SSMS. I haven't looked into it, but SSMS might not know about USE statements so it thinks that you're still querying against master, hence not finding the objects.

    Best regards,

  • Options
    JoeCasaJoeCasa Posts: 1 New member
    That answer is wrong. Yesterday, I did not have any RedGate products installed and my script had no red squiggly lines and executed perfectly. Today, I install the RedGate toolbelt and load my script into SSMS and boom! Red squiggly lines everywhere. It says my column names are all wrong. Script still executes flawlessly.

    Turn off the tool belts intellisense, the red squiggly lines go away.

    So even if it is SSMS that is providing the red squigglies, it is because of RedGate's intellisense that they appear.
  • Options
    JBoneJBone Posts: 1 New member
    edited February 7, 2019 3:23AM
    I have the same problem as JoeCasa and I have the latest RedGate Toolbelt tools installed. This is a redgate issue not ssms. If I add a using statement to the top of my script it turns the squiggly lines green in some areas. Maybe this has something to do with a cache refresh needed
Sign In or Register to comment.