473,396 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

handling money SQL and VB

cj
I have a comma delimited file with 2 numeric columns. The first is just
a decimal number that seems to have a max of 1 decimal place. The last
column is money BUT very tiny increments of money. Note all this is
included as text in the CSV file. I plan to read this csv file into a
SQL 2000 DB using VB 2003. What data type should I use in the SQL DB?
What data type should the variables be in VB? I will be adding and
subtracting these numbers. Thanks!

"SACRAMENTO,CA","1.5",".048"
"CARROLLTON,GA","21.5",".165"
"LAUREL ,MD",".3",".273"
"MONTGOMERY,AL","1","0"
"HARRISONBG,VA",".3","0"
Jul 20 '06 #1
6 2787

"cj" <cj@nospam.nospamwrote in message
news:uT****************@TK2MSFTNGP04.phx.gbl...
>I have a comma delimited file with 2 numeric columns. The first is just a
decimal number that seems to have a max of 1 decimal place. The last
column is money BUT very tiny increments of money. Note all this is
included as text in the CSV file. I plan to read this csv file into a SQL
2000 DB using VB 2003. What data type should I use in the SQL DB? What
data type should the variables be in VB? I will be adding and subtracting
these numbers. Thanks!

"SACRAMENTO,CA","1.5",".048"
"CARROLLTON,GA","21.5",".165"
"LAUREL ,MD",".3",".273"
"MONTGOMERY,AL","1","0"
"HARRISONBG,VA",".3","0"
Decimal.

David
Jul 20 '06 #2
Hi cj,

I agree with David that we can use Decimal type in SQL DB. Also, this will
map to System.Decimal in .NET framework.

Kevin Yu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Jul 21 '06 #3
cj
How would decimal differ from double?

Kevin Yu [MSFT] wrote:
Hi cj,

I agree with David that we can use Decimal type in SQL DB. Also, this will
map to System.Decimal in .NET framework.

Kevin Yu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Jul 21 '06 #4

"cj" <cj@nospam.nospamwrote in message
news:e1**************@TK2MSFTNGP04.phx.gbl...
How would decimal differ from double?
Binary floating point and .NET
http://www.skeet.org.uk/csharp/floatingpoint.html

Decimal floating point in .NET
http://www.skeet.org.uk/csharp/decimal.html

David
Jul 21 '06 #5
cj
Thanks.

David Browne wrote:
"cj" <cj@nospam.nospamwrote in message
news:e1**************@TK2MSFTNGP04.phx.gbl...
>How would decimal differ from double?

Binary floating point and .NET
http://www.skeet.org.uk/csharp/floatingpoint.html

Decimal floating point in .NET
http://www.skeet.org.uk/csharp/decimal.html

David

Jul 21 '06 #6
Hi cj,

Double type is a Floating-Point number. So it may lose precision. The
following article may also be helpful.

http://msdn2.microsoft.com/en-us/library/c151dt3s.aspx

Kevin Yu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Jul 24 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Bill Loren | last post by:
Hello ppl, I'm having difficulties to accomplish some simple chores with binary data. I'm having a string (?) which I received via an HTTP transactions which is a binary file. Problem is the...
24
by: Batista, Facundo | last post by:
Here I send it. Suggestions and all kinds of recomendations are more than welcomed. If it all goes ok, it'll be a PEP when I finish writing the code. Thank you. .. Facundo
41
by: Jordan | last post by:
While writing some code, I realized I had never developed a consistent pattern for checking errors from a method. I have two styles I jump back and forth between, but I'm wondering which is...
44
by: Kulgan | last post by:
Hi I am struggling to find definitive information on how IE 5.5, 6 and 7 handle character input (I am happy with the display of text). I have two main questions: 1. Does IE automaticall...
7
by: Jason Kester | last post by:
Best I can tell, there are three basic ways you can deal with global error handling in ASP.NET. Namely: 1. Derive all your pages from a custom Page class, and override OnError() 2. Specify a...
94
by: Chad | last post by:
On to top of page 163 in the book "The C Programming Langauge" by K & R, they have the following: char *strdup(char *s) { char *p; p=(char *)malloc(strlen(s)+1); if( p != NULL) strcpy(p,s):...
7
KoreyAusTex
by: KoreyAusTex | last post by:
I am having a very hard time making this program work right, I am sort of lost and I was wondering if I might get some advice. This is what I have so far but I have a rounding error when I use the...
4
by: gamaz | last post by:
Hi, I am trying to work on a stored procedure that will work with multiple database. I have a prototype of multiple databases. Those are named as the following: ts2_aldkm_app, ts2_aldkp_app,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.