Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cast string data type to Int in SQL QUery for MS Access

I am trying to write a query in access that will pull results that are in the database in a text Acually,I have RECEIPTNO Column whose datatype is TEXT in Table Membership, & I want to pull all the results from RECEIPTNO column where RECEIPTNO is BETWEEN 1 AND 10

And I tried Below Code.

SELECT Cint(RECEIPTNO) FROM MEMBERSHIP where Cint(RECEIPTNO) BETWEEN 1 AND 10

Result is: Overflow , Any Idea?

like image 430
amol kadam Avatar asked Feb 27 '23 16:02

amol kadam


1 Answers

Do you want:

SELECT RECEIPTNO FROM MEMBERSHIP
WHERE Val(RECEIPTNO) BETWEEN 1 AND 10
like image 104
Fionnuala Avatar answered Mar 02 '23 00:03

Fionnuala