select * from CurrencyMaster where default=true
invalid syntax near keyword default.You cannot have a reserved word as a field name without enclosing it in brackets.
Therefore :
select * from CurrencyMaster where default=true
doesn't work, and
select * from CurrencyMaster where [default]=true
will probably work. (Haven't tested it myself tho...)
Showing posts with label keyword. Show all posts
Showing posts with label keyword. Show all posts
Wednesday, March 28, 2012
Wednesday, March 21, 2012
Invalid Keyword Color
Yesterday I installed SQL Server 2005 (April CTP) side-by-side with SQL
Server 2000. Everything appeard to go just fine except for when I went to
view my stored procedures or do anything in query analyzer most of the
reserved keywords do not appear in the default blue font anymore. For
example, CREATE PROCEDURE the word Create is in black but Procedure appears
in blue...ORDER BY, Order appears in black and By appears in Blue. This onl
y
happens when I am in SQL Server 2000, anything I do in 2005 appears
correctly. Any ideas?I was able to find the answer in another newsgroup. Apparently this is a
known issue with 2005 beta. What you need to do is find the sqllex.dll,
normally found in C:\Program Files\Microsoft SQL Server\80\Tools\Binn and
re-register this file. This fixed the problem for me.sql
Server 2000. Everything appeard to go just fine except for when I went to
view my stored procedures or do anything in query analyzer most of the
reserved keywords do not appear in the default blue font anymore. For
example, CREATE PROCEDURE the word Create is in black but Procedure appears
in blue...ORDER BY, Order appears in black and By appears in Blue. This onl
y
happens when I am in SQL Server 2000, anything I do in 2005 appears
correctly. Any ideas?I was able to find the answer in another newsgroup. Apparently this is a
known issue with 2005 beta. What you need to do is find the sqllex.dll,
normally found in C:\Program Files\Microsoft SQL Server\80\Tools\Binn and
re-register this file. This fixed the problem for me.sql
Subscribe to:
Posts (Atom)