Re: Storing Doubles in SQL
- From: "Dave Patrick" <DSPatrick@xxxxxxxxxxxxxxxx>
- Date: Sun, 11 Feb 2007 17:49:02 -0700
You don't want the string delimiters. Do something like;
INSERT INTO Employees
(EmployeeID, FirstName, LastName)
VALUES (9999, N'John', N'Smith')
--
Regards,
Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
"naive14" wrote:
Thanks. So I'll use a Double definition in my sql database..
As to the second part of the question, should I convert the double to a string and format as in :
dim s, sqlCMD as string
dim d as double
d = 5459.459
s = Format(d, "##,##0.00")
sqlCMD = "INSERT INTO tablex VALUES ('" & s & "')
' the above probably rounds off to 2 decimals
or is this valid ...
sqlCMD = "INSERT INTO tablex VALUES ('" & d & "')
- References:
- Re: Storing Doubles in SQL
- From: Dave Patrick
- Re: Storing Doubles in SQL
- From: naive14
- Re: Storing Doubles in SQL
- Prev by Date: Re: UserForm with ListBox, data from 2 fields
- Next by Date: Re: Storing Doubles in SQL
- Previous by thread: Re: Storing Doubles in SQL
- Next by thread: Re: Storing Doubles in SQL
- Index(es):
Relevant Pages
|