Why is my LIKE query not returning any records in Microsoft Access 2013 only?

StockB

My SQL query is as follows:

SELECT * FROM Suppliers WHERE SupplierName LIKE 's%';

When I submit this query on W3 School's TryIt Editor (v1.2) (http://www.w3schools.com/sql/trysql.asp?filename=trysql_select_like), it returns a number of records where the SupplierName begins with the letter 'S', as expected.

However, when I run this query on my own database in Access 2013, it doesn't return any records, even though my table name and field name are identical to W3's sample.

Queries not using 'LIKE' seem to work ok, for example:

SELECT * FROM Suppliers WHERE SupplierName="Part Supplier, Inc.";

returns the appropriate record(s). It is only when 'LIKE' is used that Access returns no records at all.

My question is, is there any reason why LIKE queries don't return any records? The back-end data source is a Microsoft JET database (this is a relatively small database - no need for full SQL Server), but I don't think this should make a difference. Access doesn't complain about syntax or throw an error when I execute the query.

StockB

From http://technet.microsoft.com/en-us/library/cc966377.aspx :

Microsoft Jet uses partial match (or "wildcard") characters with the Like operator that are different from those used in most SQL dialects. The asterisk (*) character matches zero or more characters and is equivalent to the percent (%) character in ANSI SQL. The other Microsoft Jet partial match characters are the question mark (?), which matches any character in a single field, and the number sign (#), which matches any digit in a single field.

The query should be modified like so:

SELECT * FROM Suppliers WHERE SupplierName LIKE 's*';

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Why a Long Text field is returning only 255 characters in a MS ACCESS 2013 query?

From Dev

Is my DNS resolver broken? Returning A record only on ANY query

From Dev

Why is my SQL Month query not returning any results?

From Dev

Linq Query with date range not returning any records?

From Dev

Linq query with .Contains not returning any records

From Dev

Access 2013 - Query not returning correct Number of Results

From Dev

Why this SQL query returning exact duplicate records?

From Dev

Microsoft Access query returning sequential numbers

From Dev

Microsoft Access query returning sequential numbers

From Dev

Query for latest version of records in Microsoft Access

From Dev

Display selected records on message box in the Form of Microsoft Access 2013

From Dev

Why is this SPARQL query not returning any results?

From Dev

Why is this regexp query not returning any results?

From Dev

Returning only whole numbers in MS Access query

From Dev

Why is my query running so slowly when returning values from another table in Access?

From Dev

why my Codeigniter database query is only returning one row instead of more?

From Dev

Why is this query (potentially) only returning posts that are questions?

From Dev

Why is my query returning incorrect results?

From Dev

Why is my ElasticSeach query returning zero document?

From Java

Why Android Room @Query LIKE is not returning data known to exist

From Dev

Why Android Room @Query LIKE is not returning data known to exist

From Dev

Why is my query method for my SQLite returning an error?

From Dev

Why is my query of my SQLite database returning null?

From Dev

Why is my query always returning the path of the first image in my table?

From Dev

Why is this elastic search query with must clause not returning any documents?

From Dev

Query to show only unique records based on certain criteria in ACCESS

From Dev

Microsoft Access SQL to return only records where the last record in a set of grouped records equals something in another column

From Dev

Why can't I access my file in VS 2013 with TFS

From Dev

MYSQL Query not returning expected records

Related Related

  1. 1

    Why a Long Text field is returning only 255 characters in a MS ACCESS 2013 query?

  2. 2

    Is my DNS resolver broken? Returning A record only on ANY query

  3. 3

    Why is my SQL Month query not returning any results?

  4. 4

    Linq Query with date range not returning any records?

  5. 5

    Linq query with .Contains not returning any records

  6. 6

    Access 2013 - Query not returning correct Number of Results

  7. 7

    Why this SQL query returning exact duplicate records?

  8. 8

    Microsoft Access query returning sequential numbers

  9. 9

    Microsoft Access query returning sequential numbers

  10. 10

    Query for latest version of records in Microsoft Access

  11. 11

    Display selected records on message box in the Form of Microsoft Access 2013

  12. 12

    Why is this SPARQL query not returning any results?

  13. 13

    Why is this regexp query not returning any results?

  14. 14

    Returning only whole numbers in MS Access query

  15. 15

    Why is my query running so slowly when returning values from another table in Access?

  16. 16

    why my Codeigniter database query is only returning one row instead of more?

  17. 17

    Why is this query (potentially) only returning posts that are questions?

  18. 18

    Why is my query returning incorrect results?

  19. 19

    Why is my ElasticSeach query returning zero document?

  20. 20

    Why Android Room @Query LIKE is not returning data known to exist

  21. 21

    Why Android Room @Query LIKE is not returning data known to exist

  22. 22

    Why is my query method for my SQLite returning an error?

  23. 23

    Why is my query of my SQLite database returning null?

  24. 24

    Why is my query always returning the path of the first image in my table?

  25. 25

    Why is this elastic search query with must clause not returning any documents?

  26. 26

    Query to show only unique records based on certain criteria in ACCESS

  27. 27

    Microsoft Access SQL to return only records where the last record in a set of grouped records equals something in another column

  28. 28

    Why can't I access my file in VS 2013 with TFS

  29. 29

    MYSQL Query not returning expected records

HotTag

Archive