Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6141419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:14:52+00:00 2026-05-23T18:14:52+00:00

Need to ask about strange behaviour of SQL Server 2005. What I need is

  • 0

Need to ask about strange behaviour of SQL Server 2005.

What I need is to find records that contain ‘]’ or ‘[‘ in my column

I have a data in column like this

'6b51c65b-5773-415a-aec9-8482c404faef_megas_xlr[1].jpg'

When I run this query

select * from Theme  where BackgroundImageUrl like '%[%'

then no records comes up, but running this below query

select * from Theme  where BackgroundImageUrl like '%]%'

boils following output

'6b51c65b-5773-415a-aec9-8482c404faef_megas_xlr[1].jpg'

What’s wrong in that query? What do I need to do in order to search records having closing or starting brackets []?

EDIT..

For more clarification, here is my test data.
A[1].jpg
B[1.jpg
C1].jpg

And below are results that I got after running following combination

A select BackgroundImageUrl from Theme where BackgroundImageUrl like '%[%'

No Results

B select BackgroundImageUrl from Theme where BackgroundImageUrl like '%]%'

A[1].jpg
C1].jpg

C select BackgroundImageUrl from Theme where BackgroundImageUrl like '%[ [ ]%'

A[1].jpg
B[1.jpg

D select BackgroundImageUrl from Theme where BackgroundImageUrl like '%[ ] ]%'

No Results

What I need is that,
Case 1 : I need all records that contains ‘[‘

Case2 : I need all records that contains ‘]’

Query C fulfills my case 1 but I m not able to get result for my case 2

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T18:14:53+00:00Added an answer on May 23, 2026 at 6:14 pm

    Well i just discovered my answer.

    select * from Theme  where BackgroundImageUrl like  '%\]%' ESCAPE '\'
    

    and

    select * from Theme  where BackgroundImageUrl like  '%\[%' ESCAPE '\'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

need ask you about some help. I have web app running in Net 2.0.
I have a strange (don't ask) need to see a few examples of a
That's about all I need to ask. Checked the PHP manual and saw a
That's about all that I need to ask I am dealing with a site
I have a problem that I tried to ask about previously, but didn't get
i need to ask some question about crystal report. I have successfully run crystal
Why you may ask? Because i have built the app on mysql and need
I hate to have to ask, but I'm pretty stuck here. I need to
I need to ask a question about HTTP protocol. I am trying to develop
I've seen a number of posts that ask about using non-conforming Uris, but none

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.