Derby “德比”&&引用;它不起作用了 选择不同的APP.bca\u cart.InventoryCode、APP.bca\u cart.InventoryID、APP.bca\u cart.InvoiceID、APP.bca\u cart.UnitPrice、APP.bca\u cart.DateAdded、APP.bca\u cart.CustomSku、APP.bca\u cart.InventoryCode&'-'&APP.bca\u cart.CustomSku作为完整SKU、APP.bca\u cart.Qty作为数量、APP.storage\u客户名,APP.bca\u iteminventory内部联接(APP.bca\u cart内部联接APP.bca\u cart.InvoiceID=APP.bca\u invoice.InvoiceID=APP.bca\u invoice.InvoiceID=APP.bca\u iteminventory.InventoryID=APP.bca\u cart.InventoryID)上的APP.bca\u clientvendoiceId内部连接APP.bca\u invoice.ClientVendorID=APP.storage\u ClientVendorID.ClientVendorID)其中APP.bca\u itemnoventory.StoreTypeID

Derby “德比”&&引用;它不起作用了 选择不同的APP.bca\u cart.InventoryCode、APP.bca\u cart.InventoryID、APP.bca\u cart.InvoiceID、APP.bca\u cart.UnitPrice、APP.bca\u cart.DateAdded、APP.bca\u cart.CustomSku、APP.bca\u cart.InventoryCode&'-'&APP.bca\u cart.CustomSku作为完整SKU、APP.bca\u cart.Qty作为数量、APP.storage\u客户名,APP.bca\u iteminventory内部联接(APP.bca\u cart内部联接APP.bca\u cart.InvoiceID=APP.bca\u invoice.InvoiceID=APP.bca\u invoice.InvoiceID=APP.bca\u iteminventory.InventoryID=APP.bca\u cart.InventoryID)上的APP.bca\u clientvendoiceId内部连接APP.bca\u invoice.ClientVendorID=APP.storage\u ClientVendorID.ClientVendorID)其中APP.bca\u itemnoventory.StoreTypeID,derby,Derby,我想您应该使用和来连接字符串 对于浓缩,您必须使用| | SEVERE: null java.sql.SQLSyntaxErrorException: Syntax error: Encountered "&" at line 1, column 145. at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Uti

我想您应该使用
来连接字符串

对于浓缩,您必须使用
| |

SEVERE: null
java.sql.SQLSyntaxErrorException: Syntax error: Encountered "&" at line 1, column 145.
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(Unknown Source)
at com.bzcomposer.global.tables.tblItemLoader.getBackOrderItemListByCustomer(tblItemLoader.java:8488)
at com.bzcomposer.items.ItemListPanel$BackOrderItemModel.setTableData(ItemListPanel.java:4424)
at com.bzcomposer.items.ItemListPanel$BackOrderItemModel.<init>(ItemListPanel.java:4407)
at com.bzcomposer.items.ItemListPanel.<init>(ItemListPanel.java:140)
at com.bzcomposer.modules.internalPanel.SalesPanels.<init>(SalesPanels.java:90)
at com.bzcomposer.modules.internalPanel.InternalPanelsControl.init_internalPanel1(InternalPanelsControl.java:162)
at com.bzcomposer.modules.MainFrame2.init_internalframe1(MainFrame2.java:1104)
at com.bzcomposer.modules.MainFrame2.invokeInit(MainFrame2.java:816)
at com.bzcomposer.modules.MainPanel$1.run(MainPanel.java:393)
Caused by: java.sql.SQLException: Syntax error: Encountered "&" at line 1, column 145.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
... 17 more
Caused by: ERROR 42X01: Syntax error: Encountered "&" at line 1, column 145.
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement(Unknown Source)

完成上述更改后,我在同一个query.java.sql.SQLSyntaxErrorException中遇到新错误:“APP.BCA_CUSTOMSELECT.QTY”列不在FROM列表中的任何表中,或者出现在联接规范中,并且不在联接规范的范围内,或者出现在HAVING子句中,并且不在GROUP BY列表中。如果这是CREATE或ALTER TABLE语句,则“APP.BCA\u CUSTOMSELECT.QTY”不是目标表中的一列。org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(未知源)org.apache.derby.impl.jdbc.Util.generateCsSQLException(未知源)您的查询中的
APP
是什么?数据库模式还是什么?
SEVERE: null
java.sql.SQLSyntaxErrorException: Syntax error: Encountered "&" at line 1, column 145.
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(Unknown Source)
at com.bzcomposer.global.tables.tblItemLoader.getBackOrderItemListByCustomer(tblItemLoader.java:8488)
at com.bzcomposer.items.ItemListPanel$BackOrderItemModel.setTableData(ItemListPanel.java:4424)
at com.bzcomposer.items.ItemListPanel$BackOrderItemModel.<init>(ItemListPanel.java:4407)
at com.bzcomposer.items.ItemListPanel.<init>(ItemListPanel.java:140)
at com.bzcomposer.modules.internalPanel.SalesPanels.<init>(SalesPanels.java:90)
at com.bzcomposer.modules.internalPanel.InternalPanelsControl.init_internalPanel1(InternalPanelsControl.java:162)
at com.bzcomposer.modules.MainFrame2.init_internalframe1(MainFrame2.java:1104)
at com.bzcomposer.modules.MainFrame2.invokeInit(MainFrame2.java:816)
at com.bzcomposer.modules.MainPanel$1.run(MainPanel.java:393)
Caused by: java.sql.SQLException: Syntax error: Encountered "&" at line 1, column 145.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
... 17 more
Caused by: ERROR 42X01: Syntax error: Encountered "&" at line 1, column 145.
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement(Unknown Source)
APP.bca_cart.InventoryCode  || '-'  ||  APP.bca_cart.CustomSku