我有一些在 mssql 平台上执行良好的 SQL,但我们从 switch yard camel flow(SQL 绑定)执行它不起作用。
sql是
SELECT
p.ProductID,p.dtGTIN,p.ProductWeight
,p.dtPurchasePriceUnit,p.dtItemGroupID,
p.dtPromotionID,p.IntroductionDate,p.dtOnOrder,
p.dtExposureGroup,p.dtPlanogram,p.ProductHeight,
p.ProductWidth,p.ProductLength,p.dtPackageSize1,
p.productHeightUOMID,p.productWidthUOMID,p.productLengthUOMID,
pn.dtProductNameDescription1,pn.dtProductNameDescription2,
pv.VendorID,pr.ReferenceNumber
FROM ODS_Product p
JOIN ODS_ProductName pn
ON pn.ProductID=p.ProductID and pn.BusinessUnitId=p.BusinessUnitId
JOIN ODS_ProductVendor pv
ON pv.ProductID=p.ProductID and pv.BusinessUnitId=p.BusinessUnitId
LEFT JOIN ODS_dtProductReference pr
ON (pr.ProductID=p.ProductID and pr.BusinessUnitId=p.BusinessUnitId and
pr.ReferenceID='SRII')
where p.ProductID=# and p.BusinessUnitId=#
消息是
Caused by exception of type com.microsoft.sqlserver.jdbc.SQLServerException,
message: com.microsoft.sqlserver.jdbc.SQLServerException: The multi-part
identifier "p.ProductID" could not be bound.:
org.switchyard.HandlerException: org.switchyard.HandlerException:
org.springframework.jdbc.UncategorizedSQLException:
PreparedStatementCallback; uncategorized SQLException for SQL. SQL state
[null]; error code [0]; com.microsoft.sqlserver.jdbc.SQLServerException: The
multi-part identifier "p.ProductID" could not be bound.; nested exception is
com.microsoft.sqlserver.jdbc.SQLServerException:
com.microsoft.sqlserver.jdbc.SQLServerException: The multi-part identifier
"p.ProductID" could not be bound.
知道为什么吗?