Why can't I do a “with x as (…)” with ADODB and Oracle?

后端 未结 2 1150
一生所求
一生所求 2020-12-10 06:38

I fail to execute an SQL query with a with clause via ADODB and Oracle.

That is, the following snippet works:

Dim cn As ADODB.connection
Set         


        
2条回答
  •  遥遥无期
    2020-12-10 07:05

    Above method did not work for me.

    Adding ";" prior to WITH keyword resolved the issue.

    Dim sql As String sql = ";with w as (select 'foo' x from dual) select x from w"

    rs.Open sql, cn

提交回复
热议问题