excel - How correctly to insert an SQL query inside For statement in a Macro? -
excel - How correctly to insert an SQL query inside For statement in a Macro? -
i want pass iterations of statements within query in excel macro:
for i=1 9 j=1 3 set rs = conn.execute("select * table_a ref1='i' , ref2='j'") ... next j next
i error: "error converting info type varchar bigint"
on database values of ref1 , ref2 float.
how can insert parameters correctly?
you have concat values of i
, j
.
for i=1 9 j=1 3 set rs = conn.execute("select * table_a ref1='" & & "' , ref2='" & j & "'") ... next j next
sql excel excel-vba
Comments
Post a Comment