java.sql.SQLException: ORA-00933: SQL command not properly ended -


select substr(mesg,98,15) acc,from tbaadm.rtt cust_or_card_id= "+no+"'" +                    "and to_date(to_char(system_date_time,'mm-dd-yy'))= "+trandate+"'" +                    "and to_number(sno)=' "+sno+"'" +                    "and dcc_id='swt' , cmd='prcr' , bank_id='pmc01' "; 

you have quotations @ places or miss them else. , comma should deleted before from.

"select substr(mesg,98,15) acc tbaadm.rtt cust_or_card_id= '"+no+"' " +                    "and to_date(to_char(system_date_time,'mm-dd-yy'))= '"+trandate+"' " +                    "and to_number(sno)= "+sno+" " +                    "and dcc_id='swt' , cmd='prcr' , bank_id='pmc01' "; 

Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -