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

Select numeric values..... 1

Status
Not open for further replies.

Johnny42

Technical User
Jul 13, 2004
127
CA
SELECT Items.ITEMNO, Items.DESC, Items.CATEGORY, Items.COMMENT1, Items.COMMENT2, Items.COMMENT3, Items.COMMENT4
FROM Items
WHERE (((Items.ITEMNO)>="0" And (Items.ITEMNO)<":"))

Why wont this return numeric values only.......
the code works fine in pervasive....!
 
if you have the zero in quotes, that's a string not a number. If you have : in your item number, then it is a string and should work. What kind of field is ItemNo? What kind of data does it contain?


Leslie
 
Have you tried this ?
WHERE IsNumeric(Items.ITEMNO);

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks...
Well the data looks like this...
1234
B1234
1234B

I'm building an interface using Access as data source ...but will be operation on a pervasive data base...so the isnumeric DOES NOT work wit pervasive....
 
And this ?
WHERE Not Items.ITEMNO Like '*[A-Z]*';

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Not like did id........Thanks PH and thanks lespaul
 
SELECT DESC FROM items where (DESC like ('%" & cllistbox1 & "%')and (Items.ITEMNO) Not Like ('*[A-Z]*')) "

what did I do wrong ?
 
SELECT [DESC] FROM items WHERE [DESC] Like '*" & cllistbox1 & "*' And Not ITEMNO Like '*[A-Z]*'"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
* must be % ...works great thanks !!!!!

And Not ITEMNO Like '%[A-Z]%'
 
I correct myself....
"SELECT ""DESC"" FROM items WHERE ""DESC"" Like '%" & cllistbox1 & "' And ITEMNO Not Like ('*[A-Z]*')"

works fine...:)
 
now querying Access...but when done will be querying Pervasive 8
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top