PreparedStatementCallback;糟糕的SQL语法

时间:2013-03-22 09:57:18

标签: sql select

我的sql命令出现以下sql错误!请有人能解释一下我在这里做错了什么!

  15:20:43,686 ERROR [PageExceptionFlowInterceptor] Exception (EJBException) while executing Action [com.jkcs.khms.web.cashiering.hotelTax.HotelTaxAction] : org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [SELECT * FROM (SELECT rs_qry.*, ROWNUM rn_qry FROM ( SELECT   ht.htl_tax_id, 
                    ht.hotel_id, 
                    ht.tax_id,
                    ht.status, 
                    ht.display_sequence, 
                    t.id, 
                    t.code, 
                    h.hotel_name, 
                    h.hotel_id
            FROM 
                    PMS_T_HTL_TAX ht, 
                    CRS_T_TAX t, 
                    CRS_T_HOTEL h WHERE ht.hotel_id IN (1) AND ht.tax_id IN (31,3,37,38,36,23,29,30,24,10,12,20,11,1,16,17,18,19,34,35,15,33,22,2,21,32) order by  ht.hotel_id, ht.htl_tax_id  ) rs_qry ) WHERE rn_qry BETWEEN 1 AND 10]; nested exception is java.sql.SQLException: ORA-00904: "T"."ID": invalid identifier

1 个答案:

答案 0 :(得分:0)

您的CRS_T_TAX表没有名为ID的列