Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

importing numbers from access into sql with different format

Posted on 2011-03-09
4
Medium Priority
?
315 Views
Last Modified: 2012-06-22
I am importing a column from access to sql 2005 but the numbers in the column are formatted differently:  e.g.
2000
0.50
2.8
22.55
I would like all to have decimal 2 places.  the sql column is money format.  thanks
0
Comment
Question by:bar0822
[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
4 Comments
 
LVL 39

Accepted Solution

by:
Aaron Tomosky earned 336 total points
ID: 35090715
You can make the column a decimal(18,2) format or you can just cast it when you use it.
Select cast(numbercolumn as decimal(18,2)) from table

If you do that you could store it as a varchar or whatever.
0
 
LVL 9

Assisted Solution

by:kaminda
kaminda earned 332 total points
ID: 35091117
I would suggest you to import data to SQL Server's varchar column with the required length. And then covert it to money within SQL Server by casting it. This way you wont loose any data due to formating (At least it is minimal)
0
 
LVL 51

Assisted Solution

by:Gustav Brock
Gustav Brock earned 332 total points
ID: 35093276
Leave the numbers "as is" and format them to your liking when displayed.

/gustav
0
 

Author Comment

by:bar0822
ID: 35097666
I imported as is and imported into money column and now have 4 zeros after decimal point but will leave as is unless they want it changed.  I'll use a cast in select.  thanks for the replies.

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

705 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