Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Issues with [ and ] in data 1

Status
Not open for further replies.

tmar

MIS
Mar 24, 2007
62
US
I have and item in my system with an ID of NP-M271x[chas] and I am unable to grab that item via a sql query like:

select * from timitem where itemid like 'NP-M271x[chas]'

From my testing I see the ['s are the issue but have no idea how to deal with them.
 
Hi tmar,

you needd to escape the brackets either with brackets or with backslashes. I think backslashes are nicer to the eye:

;-)

Cheers,
MakeItSo

“Knowledge is power. Information is liberating. Education is the premise of progress, in every society, in every family.” (Kofi Annan)
Oppose SOPA, PIPA, ACTA; measures to curb freedom of information under whatever name whatsoever.
 
Since you're not using any wildcards, is there any reason you're using 'LIKE' instead of '='?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top