Select Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using a select query that looks like:
SELECT GROUPNAME, ITEMNAME FROM MASTERRG_DETAIL
WHERE (((MASTERRG_DETAIL.ITEMNAME)="113"));

The data generally looks like:
GROUPNAME ITEMNAME
D40000_04 101
D40000_04 102
D40000_04 107
D40000_04 113
D40005_01 101
D40005_01 113

Although there are two groups that contain the item '113' I am getting no
rows returned. Help!
I am using Access 2000 - just to troubleshoot - I am really coding in VB but
getting the same result in both places.
 
Assumption:
ItemName is a text field that contains numeric characters.

One possibility is that ItemName has trailing (or leading) characters that
you cannot see. To test this, trye
SELECT GROUPNAME, ITEMNAME FROM MASTERRG_DETAIL
WHERE (((MASTERRG_DETAIL.ITEMNAME) LIKE "*113*"));

You may need to use % in place of * depending on whether you are using the
Jet database engine or some other source. For instance, MS SQL wildcard is
%.
 
Both the Itemname and Group name fields are TEXT fields.
But you were right there are leading or trailing spaces that shouldn't be
there - now
I need to look at how I'm loading that table too! THANKS!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top