Dealing with single quotes in excel vba sql queries

前端 未结 1 1565
有刺的猬
有刺的猬 2021-01-23 13:30

I am using excel sql queries to fetch data from the backend according to the selection i make in a dropdown box.However my sql queries are not working in cases where there is a

1条回答
  •  一整个雨季
    2021-01-23 14:17

    Departments='" & replace(Sheet3.Range("Dept_name").Value, "'", "''") & _ "' and Metric
    

    0 讨论(0)
提交回复
热议问题