Use excel cell in SQL query string (function) -


i want import data mssql database excel spreadsheet. works fine parameters. want use cell value in function query:

example:

select round(dbo.fn_geteffort(3484, 'project', 0, 1)/8,2)  

i want use cell value 3484!

any idea?

you mean value '3484' in cell , want include in query string?

then:

s = "select round(dbo.fn_geteffort(" & sheet.cells(rownumber, columnnumber) & ", 'project', 0, 1)/8,2)" 

or:

s = "select round(dbo.fn_geteffort(" & sheet.range("a1").value & ", 'project', 0, 1)/8,2)" 

Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -