1

syntax error in query expression
SELECT [Name] FROM MSysObjects WHERE [Type]=5 And Left([Name],1)<>”~” ORDER BY [Name]; enter image description here

June7
  • 19,874
  • 8
  • 24
  • 34
Kanesha A
  • 21
  • 1
  • I copy/pasted your SQL and it errors because of the quote marks. I deleted and retyped them and it works. Or use apostrophes. – June7 May 15 '21 at 02:19
  • Those quotes are _smart quotes_ from Word. But SQL isn't smart enough to read them as quotes. – Gustav May 15 '21 at 10:30

1 Answers1

1

Your double quote char is invalid. Not sure what character you are using, but you can use double quotes

SELECT [Name] 
FROM MSysObjects 
WHERE [Type]=5 AND LEFT([Name],1)<>"~" 
ORDER BY [Name]; 

or apostrophes

SELECT [Name] 
    FROM MSysObjects 
    WHERE [Type]=5 AND LEFT([Name],1)<>'~' 
    ORDER BY [Name]; 
Michael Z.
  • 1,453
  • 1
  • 15
  • 21
  • 1
    I copy/pasted your query then replaced apostrophes with quotes and it works. – June7 May 15 '21 at 02:17
  • You're right! the OP has strange double quotes in the query. Nice catch! I guess I assumed I was right be the query worked but that I see the OPs double quotes I see the issue. – Michael Z. May 15 '21 at 02:19
  • If answer resolves issue, please mark accepted. – June7 May 15 '21 at 02:24