I have some experience with INSERT INTO statements, but when having to use them with an execute statement like conn.execute with all the quotes and all, I cannot seem to get it right.
I have a simple INSERT INTO as a tester that works fine using conn.execute strSQL. However, the first parameter needs to be an integer value instead of string and I feel like I am either going to go blind or crazy trying to figure out the correct syntax with the correct placing of the integer parameter.
(The brackets are used for YEAR and WEEK because one or maybe both of them are reserved words). Help on this would be so much appreciated.
strSQL = "INSERT INTO TEST ([YEAR], [WEEK]) VALUES ('" & intYear & "' , '" & strSeason & "')"
I have a simple INSERT INTO as a tester that works fine using conn.execute strSQL. However, the first parameter needs to be an integer value instead of string and I feel like I am either going to go blind or crazy trying to figure out the correct syntax with the correct placing of the integer parameter.
(The brackets are used for YEAR and WEEK because one or maybe both of them are reserved words). Help on this would be so much appreciated.
strSQL = "INSERT INTO TEST ([YEAR], [WEEK]) VALUES ('" & intYear & "' , '" & strSeason & "')"