How to convert varchar to numeric in SQL?
-
I have a table with multiple fields with dollar amounts in VARCHAR(10) like 0000009839.22 or 0000000099.1 or 0000000021.4 or 0000000341.32. When I pull this data into pivot table in excel, it doesn't sum. How can I fix this problem? thanks
-
Answer:
select the data and cast it as a number. In Oracle for example, that would be something like select ... to_number(column) ... and the data will be cast as a numeric value rather than a character.
nikky1_2... at Yahoo! Answers Visit the source
Related Q & A:
- How to convert below SQL Expression into derived column in SSIS?Best solution by Stack Overflow
- How to convert sql query to Hibernate Criteria query?Best solution by Stack Overflow
- How to convert my SQL query to MS Access query?Best solution by Stack Overflow
- How to convert a SQL query into hibernate criteria?Best solution by Stack Overflow
- How to convert SQL query to LINQ query?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.