|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
handling money SQL and VBI 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"
Show quote
Hide quote
"cj" <cj@nospam.nospam> wrote in message Decimal.news:uTne%23vCrGHA.3380@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" David 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/subscriptions/managednewsgroups/default.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/subscriptions/support/default.aspx. ================================================== (This posting is provided "AS IS", with no warranties, and confers no rights.) How would decimal differ from double?
Kevin Yu [MSFT] wrote: Show quoteHide quote > 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/subscriptions/managednewsgroups/default.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/subscriptions/support/default.aspx. > ================================================== > > (This posting is provided "AS IS", with no warranties, and confers no > rights.) > "cj" <cj@nospam.nospam> wrote in message Binary floating point and .NETnews:e1QROTMrGHA.3996@TK2MSFTNGP04.phx.gbl... > How would decimal differ from double? > http://www.skeet.org.uk/csharp/floatingpoint.html Decimal floating point in .NET http://www.skeet.org.uk/csharp/decimal.html David Thanks.
David Browne wrote: Show quoteHide quote > "cj" <cj@nospam.nospam> wrote in message > news:e1QROTMrGHA.3996@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 > > 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/subscriptions/managednewsgroups/default.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/subscriptions/support/default.aspx. ================================================== (This posting is provided "AS IS", with no warranties, and confers no rights.)
Diagnostics.Process & MSIEXEC problem...
Validating all controls on "Save" How to Return Value from Module? exceptions/inner exceptions Getting the full path of a folder. Expose Count from System.Collections.CollectionBase in an inherited class Referencing a MDI Parent form from a Child Force Windows to "See" new files burned to a CD/DVD? Obtain info from other computer Assembly info from separate project? |
|||||||||||||||||||||||