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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

please help with a select query

Status
Not open for further replies.

nqobile

Programmer
Aug 9, 2002
20
SZ
I have a numeric field with eight digits and
I would like to select records where the first five digits are specified and the other three can be any i.e 13201###. When criteria is '13201#' and '13201###' it gives an error message saying 'data type mismatch in criteria expression'.
Please help.
 
Hi

Criteria of

MyCol >= 13201000

will do it surely? Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
 
ken, you probably meant to write

where mycol between 13201000 and 13201999

because 13202000 satisfies your inequality

:)

rudy
 
Hi

Well corrected

MyCol >= 13201000 AND <= 13201999

or as you say

where mycol between 13201000 and 13201999

would do it

but not LIKE, which is intenbded for string fields

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top