Solved

QUERY EXPRESSION IN ACCESS GIVING WRONG FORMAT

Posted on 2007-04-03
3
170 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
  • 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 500 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

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

Suggested Solutions

Title # Comments Views Activity
Access Query 4 46
PL/SQL LOOP CURSOR 3 56
SQL Select Query help 3 42
sql query Help 12 52
Introduction Hopefully the following mnemonic and, ultimately, the acronym it represents is common place to all those reading: Please Excuse My Dear Aunt Sally (PEMDAS). Briefly, though, PEMDAS is used to signify the order of operations (http://en.…
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
A short film showing how OnPage and Connectwise integration works.
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

919 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

15 Experts available now in Live!

Get 1:1 Help Now