G
Guest
Hi all!
Could anyone tell me how to make this code work? The field from the SELECT statement is a double. Constructing the INSERT INTO statement like this, the double is inserted with a comma (like 3,27). I would like a point (like 3.27) instead. The problem is that the INSERT statement is constructed like this.
"INSERT INTO table1 (col1) VALUES (3,27)"
This does not work because I'm not trying to insert two integers, but one double.
-----------------------------------------
dim rs as ADODB.Recordset
dim cmd as ADODB.Command
rs.Open "SELECT col1 FROM table2 WHERE col2=value", _
CurrentProject.Connection
cmd.CommandText = "INSERT INTO table1 VALUES(" & _
rs!col1 & ")"
----------------------------------------------------------
Could anyone tell me how to make this code work? The field from the SELECT statement is a double. Constructing the INSERT INTO statement like this, the double is inserted with a comma (like 3,27). I would like a point (like 3.27) instead. The problem is that the INSERT statement is constructed like this.
"INSERT INTO table1 (col1) VALUES (3,27)"
This does not work because I'm not trying to insert two integers, but one double.
-----------------------------------------
dim rs as ADODB.Recordset
dim cmd as ADODB.Command
rs.Open "SELECT col1 FROM table2 WHERE col2=value", _
CurrentProject.Connection
cmd.CommandText = "INSERT INTO table1 VALUES(" & _
rs!col1 & ")"
----------------------------------------------------------