T
tim
why am I getting a syntax error on the insert statement
Set rs = CreateObject("ADODB.Recordset")
rs.Open stSql, con, 1 ' 1 = adOpenKeyset
If rs.RecordCount > 0 Then
i = 1
rs.MoveFirst
Do While i <= 12
Do Until rs.EOF
con.Execute "insert into prereport_abend (month,
system, feq, box, count_of, total_jobs, job_name,
row_order ) " _
& "values( i , rs!system , rs!feq, rs!box,
0 , rs!total_jobs, 'Ratio' , 9 ) ;"
rs.MoveNext
Loop
i = i + 1
Loop
rs.MoveFirst
Set rs = CreateObject("ADODB.Recordset")
rs.Open stSql, con, 1 ' 1 = adOpenKeyset
If rs.RecordCount > 0 Then
i = 1
rs.MoveFirst
Do While i <= 12
Do Until rs.EOF
con.Execute "insert into prereport_abend (month,
system, feq, box, count_of, total_jobs, job_name,
row_order ) " _
& "values( i , rs!system , rs!feq, rs!box,
0 , rs!total_jobs, 'Ratio' , 9 ) ;"
rs.MoveNext
Loop
i = i + 1
Loop
rs.MoveFirst