protected String getSQLCarFinder()
{
StringBuffer sb = new StringBuffer();
sb.append("select distinct T1.ASSET_AMT c1, T1.NAME c2, T1.ALIAS_NAME c3 ");
sb.append("from {0}.CARFINDERDB T1 ");
sb.append("where T1.ASSET_AMT=? ");
sb.append(" and T1.OU_TYPE_CD <> ''NOC'' ");
sb.append(" and " + IRDataSource.getLengthFunctionName() + "(T1.ASSET_AMT) <= " + CARFINDER_CODE_MAX_LENGTH);
return sb.toString();
}
오류 :SQL - 자바 : 잘못된 열 이름 : 잘못된 열 이름
[2014-01-24 10:42:20,238] Thread-66 ERROR util.XNAMEDbLogProcessor - XNAMEDbLogProcessor :: logItem : ExceptionAn unexpected token "NOC" was found following "nvalid column name '". Expected tokens may include: ",".. SQLCODE=-104, SQLSTATE=42601, DRIVER=4.7.112
[2014-01-24 10:42:20,238] Thread-66 ERROR util.XNAMEDbLogProcessor - XNAMEDbLogProcessor :: logItem : An error occurred while logging data to the database: An unexpected token "NOC" was found following "nvalid column name '". Expected tokens may include: ",".. SQLCODE=-104, SQLSTATE=42601, DRIVER=4.7.112: Data={[2014-01-24-10.42.17.318000] [server_common_name] [common_name] [] [99999] [0] [] [] [] [E] [INTRANET] [2014-01-24] [10:42:20] [CDLT] [Account : com.microsoft.sqlserver.jdbc.SQLServerException: Invalid column name 'NOC'.] }
[2014-01-24 10:42:22,458] RMI TCP Connection(98501)-172.28.24.27 DEBUG dataaccess.NewCarViewDataSource - NewCarViewDataSource:: connect : IR connect siebel without user and password
[2014-01-24 10:42:22,477] RMI TCP Connection(98501)-172.28.24.27 DEBUG dataaccess.IRDataSource - IRDataSource:: getLengthFunctionName : Lenght function name:LEN
[2014-01-24 10:42:22,478] RMI TCP Connection(98501)-172.28.24.27 ERROR server.AssociateCodeListRetrieveCommand - AssociateCodeListRetrieveCommand ::executeINTRANETCall : Exception Invalid column name 'NOC'.
[2014-01-24 10:42:22,481] RMI TCP Connection(98501)-172.28.24.27 DEBUG server.REPDatabaseCommand - REPDatabaseCommand :: executeCall : Time to execute CDLT transaction = 23
[2014-01-24 10:42:23,144] Thread-65 DEBUG util.XNAMEAlertLogProcessor - XNAMEAlertLogProcessor :: logItem : Error alert log processor: ALERT-001 -s "Error occurred in AssociateCodeListInfo" Date: Time: Server name: server_common_name Client name: common_name
User id: **strong text**
나는
sb.append(" and T1.OU_TYPE_CD <> /'NOC/' ");
sb.append(" and T1.OU_TYPE_CD <> ''NOC'' ");
sb.append(" and T1.OU_TYPE_CD <> 'NOC' ");
아무것도 작업
을 시도했다. 여기서 내가 뭘 잘못하고 있니?T1.OU_TYPE_CD
은 열 이름이고
NOC
은 그 값입니다. 내가
T1.OU_TYPE_CD
값이
NOT NOC
인지 확인하고 싶습니다.
문자열을 인쇄 할 수 있습니까? –
문제가 확실합니까? 그 뒤에는 무엇이 있을까요? –