Ver Mensaje Individual
  #2  
Viejo 11/06/09, 05:57:09
jtristan jtristan is offline
Senior Member
 
Fecha de Ingreso: oct 2007
Mensajes: 240
Pues por lo que he estado leyendo me parece que no se puede hacer directamente en la sql. Mira el punto 4.


1. in open sql you can only reference tables that are managed by/in the “ABAP dictionary”
1. open sql does not support dml statements like create table.
2. open sql does not support “advanced” sql statements like truncate, merge, rollup.
3. in open sql you can’t use aggregate functions like sum,avg.
4. open sql does not support most column functions like substr, concat (||) and “case expression” in both the select and where clauses.
5. open sql does not allow you to write predicates ( where conditions) between more than one colum … so you can’t write the following condition:
where t1.col1 <> t1.col2
6. open sql does not allow you to write predicates ( where conditions) on columns of a table joined with left (or right ) join. So you can’t write the following sql:
select … from t1 left join t2
where t2.col = ‘x’

Así que me temo, que no te quedará más remedio que recorrer todos los registros que te traidas y comprobar ahí si cumplen con la condición o no.

Un saludo.
Responder Con Cita