Hey I am trying to run a java program in a Oracle sql load.sql file. Whilerunning the program I am getting the error "ORA-00904: "C"."STAFFID": invalid identifier". I think the issue is in where I prepare the sql statement and trying to execute it. I am trying to get information out from two sql tables: a2_loan and a2_customer. In a2_loan i want to get the loan_num and the contract_date, while in the table a2_customer I want the name and the ird_num.
My statement is currently:
String sql = "select a.name, ird_num, loan_num, contract_date from a2_loan, customer b, customer c where aname=b.ird_num and b name=c.name";
PreparedStatement stmt = con.prepareStatement(sql);
I think it is in here that the problem lies but if it is somewhere else please tell me and I will copy the rest of my code!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…