I doing some tests on SQL classes and I'm having some problems to select data from countries table. The SQL query is not working and I don't know why, please find the sql query below. I did the same sql query on mySQL and it works.
I'm trying to get the country code with texts even without the entry on T005T.
DATA: result TYPE REF TO cl_sql_result_set , stmt TYPE REF TO cl_sql_statement . * set query me->set_qury( qury ) . me->result = stmt->get_stmt( )->execute_query( me->get_qury( ) ) . * content of variable qury qury = `SELECT land1, ` && `spras, ` && `(SELECT landx FROM T005T ` && `WHERE spras = 'EN' ` && `AND land1 = ? ), ` && `(SELECT natio FROM T005T ` && `WHERE spras = 'EN' ` && `AND land1 = ? )` && `FROM T005 ` && `WHERE mandt = '` && sy-mandt && `' ` && `AND land1 = ? ` && `GROUP BY land1, spras` .
Edited by: arthurfuscella on Dec 29, 2011 11:36 PM