Forum Discussion
altoma75
Dec 13, 2022Copper Contributor
Customize a parameter query with a string
I have a SQL query written and saved in Excel. In the where clause I can use: where dept = ? and then set the parameter to reference a cell where the user inputs their dept. However, I need to be...
peiyezhu
Dec 14, 2022Bronze Contributor
concatenate sql string before run it?
like
s="select * from aa where f1 in (" & cells(1,1) & ")"
rs.open cnn,s
like
s="select * from aa where f1 in (" & cells(1,1) & ")"
rs.open cnn,s