Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

QUERY EXPRESSION IN ACCESS GIVING WRONG FORMAT

Posted on 2007-04-03
3
Medium Priority
?
176 Views
Last Modified: 2010-03-20
I HAVE AN EXPRESSION THAT THAT IS A NUMBER BUT WHEN I EXPORT TO EXCEL THE FORMAT IS IGNORED.  IT APPEAR THERE IS A SPACE IN FRONT THAT NEEDS TO BE DELETED.  HOW CAN CHANGE THE QUERY EXPRESSION TO IGNORE THE SPACE.
0
Comment
Question by:kdr2003
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 9

Expert Comment

by:TheSloath
ID: 18846681
Use the Trim function, e.g. with field MyNumber from table MyTable:

SELECT Trim([MtNumber]) FROM MyTable
0
 

Author Comment

by:kdr2003
ID: 18847683
Didn't work
0
 
LVL 9

Accepted Solution

by:
TheSloath earned 2000 total points
ID: 18847798
Trim removes any spaces from around text.

Try CDbl(Trim([MtNumber])) to force the field to a 'Double' data type (Use CLng rather than CDbl if it is an integer)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

636 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