我在查询表达式中收到错误“未定义函数”字段“在excel VBA中运行SQL查询语句时。 [英] I am getting the error "undefined function 'FIELD' in query expression" when running SQL query statement in excel VBA.
本文介绍了我在查询表达式中收到错误“未定义函数”字段“在excel VBA中运行SQL查询语句时。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
SQL = "TRANSFORM FIRST(iif(isnull(c.TimeStamp1),'Pending','Complete')) "
SQL = SQL & "SELECT a.DealName, a.SettlementDate "
SQL = SQL & "FROM DealList a, DealStepLog c INNER JOIN DealStepMasterData b on b.StepName = c.DealStep "
SQL = SQL & "WHERE c.DealName = a.DealName AND "
SQL = SQL & "c.DealStep IN('Sent for De-dupe','De-dupe confirmation received','Sent for Risk feedback','Risk Queries Received','Risk feedback addressed') "
SQL = SQL & "GROUP BY a.DealName, SettlementDate "
SQL = SQL & "ORDER BY FIELD (dealStep, 'Sent for De-dupe', 'De-dupe confirmation received', 'Sent for Risk feedback', 'Risk Queries Received', 'Risk feedback addressed') ASC"
SQL = SQL & " PIVOT dealStep "
我尝试了什么:
请告诉我是否可以对我的连接做些什么?
What I have tried:
Please tell me if i can do something with my connection??
推荐答案
尝试没有FIELD的ORDER BY。
Hi,
Try "ORDER BY " without "FIELD".
这篇关于我在查询表达式中收到错误“未定义函数”字段“在excel VBA中运行SQL查询语句时。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文