common table expression - sql cte with parameter in excel microsoft query -


when using sql cte parameter in excel microsoft query as:

;with cte1 (select  id ,item.itemlookupcode item  item.notes  '%'+?+'%' ), cte2 (select itemid trans time between ? , ?) select cte1.itemlookupcode,cte2.  ,cte2.itemid cte1  join cte2  on cte1.id = cte2 .itemid 

i receive following error

[microsoft][odbc sql server driver] invalid parameter number
[microsoft][odbc sql server driver] invalid descriptor index

can me?

i faced issue , after lot of playing around modifying way parameters passed, here's found:

parameters work sql queries without cte. looks an excel bug, ticket has been closed.


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -