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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:27:42+00:00 2026-06-18T15:27:42+00:00

I am having difficulty retrieving basic data in a query. I have a relation

  • 0

I am having difficulty retrieving basic data in a query.

I have a relation with three columns, an id which is an INT and PRIMARY KEY and I have two more columns that are VARCHAR(30) called fname and lname.

I cannot get my basic query to work when asking for people by name. I can get my query to work when asking by id.

for example:

select * from customers where cid = 2; -- Does work :)

and

select * from customers where fname = 'Bob'; -- Does not work  :(

I’ve also tried many variations with different quotation makes like the double quote and the key above the tab key. And yes, there is a record with the name Bob

Can anyone help me out with what I am doing wrong?

  • 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-06-18T15:27:43+00:00Added an answer on June 18, 2026 at 3:27 pm

    There is a reasonable possibility that the field doesn’t contain the word ‘Bob’ without whitespace (spaces, tabs, carriage returns, etc) or perhaps it was put in the ‘lname’ field accidentally. Try:

    select * from customers where fname like 'Bob%' or lname like 'Bob%';
    

    and check any results for extra whitespace.

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

Sidebar

Related Questions

I have the following web config file. I am having some difficulty in retrieving
I'm having difficulty in retrieving values from a Json array. I have a Json
Having difficulty articulating this correlated subquery. I have two tables fictitious tables, foo and
I'm having difficulty retrieving the giftcard code and amount used on an order. For
I am using Jquery Cookie but am having difficulty setting and retrieving the info.
I'm essentially having difficulty pass dynamic variables to a view. I have php functions
I'm having difficulty accessing a member of one class from another class. I have
I am having difficulty retrieving a value from a string array. I need to
Having difficulty making my javascript act the way I want. I have a button,
I am having difficulty figuring out how to number my subreport's records. I have

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.