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 1001607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:42:04+00:00 2026-05-16T07:42:04+00:00

I am trying to search for any string that contains ; in a column

  • 0

I am trying to search for any string that contains “;” in a column of a table which results in some weird results.

It is not only returning me the results that have “;” but also returns those rows which don’t contain any “;” but instead contains a “‘”.

Here is my query:

select *
from fields
where Comment like '%;%'

and returned results is

Row 1 & 2 instead of 3 & 4 records

Any idea?

I am adding following table structure and some insert statements for reference. Though the result will differ now

>/****** Object: Table [dbo].[Fields]  Script Date: 08/10/2010 14:18:56 ******/
SET ANSI_NULLS ON
GO

>SET QUOTED_IDENTIFIER ON
GO

>SET ANSI_PADDING ON
GO

>CREATE TABLE [dbo].[Fields](
    [ID] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,
    [Comment] [text] NULL,
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

>SET ANSI_PADDING OFF
GO

>INSERT INTO Fields (Comment) VALUES ('Moody''s Corp')
Go

>INSERT INTO Fields (Comment) VALUES ('0% as core business is ex-growth and hasn''t grown in a decade.')
Go

>INSERT INTO Fields (Comment) VALUES ('bphivgcofc ;')
Go

>INSERT INTO Fields (Comment) VALUES ('Newsflow - recommendations on use of paracetamol. Will probably takeoff EPS; in a worst-case but low probability scenario could be a 3% hit to earnings.')
Go

——- SOLVED —–

I think the problem is within the interface I am using to query the database. This database is externally hosted so the provider has given us an interface to access that data and it seems there is a problem in that interface.

Thanks for everyone’s help and suggestions.

  • 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-16T07:42:05+00:00Added an answer on May 16, 2026 at 7:42 am

    I think its the problem within the interface I am using to query the database. This database is externally hosted so provider has given us the interface to access that data and it seems there is a problem in that interface.

    Thanks for everyone’s help and suggestions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create a function that will split a string into search
I'm trying to highlight the search results but I want to include the surrounding
I am trying to write a textbox that will search on 5 DB columns
I have a specialized string dictionary of (string, string) (_RulesAndTheirDescriptions) that contains the name
I am trying to search a list of files and only perform work on
I have to search for the first match of any string in an string
I'm trying to build a search engine that will check a list and then
I'm trying to search multiple attributes in XML : <APIS> <API Key=00001> <field Username=username1
I'm trying to search using the windows search one of my web directories for
I'm trying to implement search result highlighting for pdfs in a web app. I

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.