Solved

SQL Issue?

Posted on 2014-03-03
3
214 Views
Last Modified: 2014-03-03
I am using this SQL: SELECT * from invoice where ListID = 'C4D0000-1163516830'.

It produces an empty result set.

See attached for table content. There is a record there with 'ListID' as specified.

Why can it NOT find this record?
sql-issue.jpg
0
Comment
Question by:Richard Korts
  • 2
3 Comments
 
LVL 34

Accepted Solution

by:
Dan Craciun earned 500 total points
ID: 39901523
I suspect you have an extra space.

Verify if this works:
SELECT * from invoice where ListID LIKE '*C4D0000-1163516830*';

HTH,
Dan
0
 

Author Comment

by:Richard Korts
ID: 39901666
That did NOT work; however, I thought the % was the delimiter for "any characters" so I used:

SELECT * from invoice where ListID LIKE '%C4D0000-1163516830%'

and it worked.

Thanks
0
 
LVL 34

Expert Comment

by:Dan Craciun
ID: 39901671
Yup, sorry. On MySQL it's "%"
Too much Regex lately :)

Glad I could help!
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I use MySQL for many of my development projects in a Windows environment. To manage my databases (and perform queries) for years I used a tool called MySQL administrator.  This tool has since been replaced by MySQL Workbench. So I decided to m…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question