Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using the LIKE operator

Status
Not open for further replies.

vickie7408

Technical User
Apr 10, 2007
1
US
I am trying to create a report with account numbers that start with "620". When I entered Like "620*", I am only getting 1 record but I know I have 4 records that should be showing with an account number of "620". Is there another formula I could use?
 




Hi,

Are you account numbers NUMERIC data types or TEXT? The LIKE operator works on TEXT.

Skip,

[glasses] [red][/red]
[tongue]
 



If it's numeric, you may be better off using BETWEEN 62000 and 62099, depending on the length of your Account ID.

Skip,

[glasses] [red][/red]
[tongue]
 
you know Skip, I was going to ask that exact question, but then I tried a like query on a numeric field and it worked. Of course it was not an Access table...but I assumed that the LIKE operator would work to a ISO standard and if it worked on a numeric field in one RDBMS that it would work on an Access table too.

Les
 




I guess because the compiler does some kind of a data conversion for you in the background maybe?

Skip,

[glasses] [red][/red]
[tongue]
 

If I remember correctly, the # is the equivelant of ? for one character in numeric fields used with the LIKE operator
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top