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

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -