I'm using the following SQL query for inserting into MySQL database:
Id = "8059"
Discount = "1,234"
SQL = "INSERT INTO tbl (fld1, fld2) VALUES ('" & Id & "', " & Discount & ")"
How to insert decimal number into database? The script returns "Column count doesn't match value count at row 1" (it obviously thinks I'm trying to insert another value after comma in decimal number)
- I don't want to use RS.Open, RS.AddNew, RS.Update procedure due to speed benefits of INSERT method.
- "Id" and "Discount" values are populated from another table and I have thousands of those values which I want to insert into this "tbl" so they need to stay in variables.
- "fld1" is VARCHAR(50), "fld2" is DECIMAL(18,4)
Any help appreciated, Google was not my friend this time :(