Jump to content

Using [ and ] in where clause


silvercover

Recommended Posts

Hi,

 

I need to select some rows from my MSSQL database where some of my field names have [ and ] chars in their names. so when I want to post my query SQL Server says this:

 

  Quote
An expression of non-boolean type specified in a context where a condition is expected, near 'Passwd'.

 

Here is my SQL query:

SELECT [TAC_ID]
      ,[TAC_Attr]
      ,[TAC_Val]
  FROM [NTTabDB].[dbo].[TAC_USR]
  WHERE [Global]Passwd =  53505;

 

What's wrong?

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/180837-using-and-in-where-clause/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.