Solved

using cast or convert in assces 2005 query to convert a text field to integer

Posted on 2006-06-09
2
438 Views
Last Modified: 2008-02-01
I have a linked table to an as400 db the field on the as400 is a text  field i have a query that needs to compair the value from the as400 to an INteger(number) how so i use a cast  or convert function in my asscess 2005 query

select as400.PONum from as400

in sql i would just select cast(as400.ponum as int) as ponum but it does not work in acess 2005
0
Comment
Question by:LeeHopkins
2 Comments
 
LVL 15

Accepted Solution

by:
cquinn earned 50 total points
ID: 16871350
select CInt(as400.PONum) from as400
0
 
LVL 54

Expert Comment

by:nico5038
ID: 16871367
Try:

select Val(PONum) as numPOnum from as400;

Nic;o)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now