Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 218
  • Last Modified:

Help me with the query

let say, i have a table tblMain
THe table has following fields:
Rec#          num
Name         text
Account     text
Zip             text
the query retrieves all from the table:
select Rec# ,Name,Account,Zip        from tblMain
 At some point i link the table to another table tblAccount
tblAccount has many fields, and one of them is AccountNum which has a datatype number
how to convert the datatype so called "on fly" to number

------------>select Rec# ,Name,convertonumber(Account,) Zip        from tblMain
something like this
0
rfedorov
Asked:
rfedorov
  • 3
  • 2
2 Solutions
 
SharathData EngineerCommented:
You mean this?
select Rec# ,Name,cast(Account as number) Zip        from tblMain

Open in new window

0
 
rfedorovAuthor Commented:
something like this, just to make sure is for ms access?
0
 
rfedorovAuthor Commented:
The CAST and CONVERT column functions do not seem to work in MS Access. How can I convert a text column to an integer (number) column?

0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
Paul JacksonCommented:
Select Rec#, Name, VAL(Account) As Account, Zip from tblMain
0
 
SharathData EngineerCommented:
try CINT.

select Rec# ,Name,CINT(Account), Zip        from tblMain
0
 
rfedorovAuthor Commented:
TO jacko72: WORKS GREAT

I USED the val () in where part of the query and everything works!!!

THANK YOU EVERYBODY
Could you also look at my another querstion?

ID:27026674
help me with ms box in ms access 2010
05/09/11 08:50 AM, ID: 27026674 | Points: 500
help me with ms box in ms access 2010
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now