Hello all,
So I thought this was easy, but it is giving me a hardtime :) I need to count rows where field "servicioImplicado" is not empty: <entity-count count-name="resumen.numero" entity-name="SeguimientoCentro"> <condition-list> <condition-expr field-name="servicioImplicado" operator="not-equals" value="null"/> <condition-expr field-name="servicioImplicado" operator="not-equals" value=""/> <condition-expr field-name="servicioImplicado" ignore-if-empty="true"/> <condition-expr field-name="servicioImplicado" ignore-if-null="true"/> <condition-expr field-name="servicioImplicado" operator="like" value=".+"/> </condition-list> </entity-count> I have tried with all this conditions separately and together, but none of them gives a correct result. the definition of field is: <field name="servicioImplicado" type="comment"></field> I am using Postgresql 8, SQL field definition is VARCHAR(255) Any ideas? Thanks in advance, -- ------------------------------------------------------------------------ Soluciones de Gestión para su empresa eBusiness, ERP, CRM ------------------------------------------------------------------------ *Daniel Martínez Martínez* * * Director de Proyectos C/ Julia García Boután, 29 D 3ºB 28022 Madrid España * * E-mail: [hidden email] <mailto:[hidden email]> Web: *www.paradisosistemas.es <http://www.paradisosistemas.es> *Comercial: [hidden email] <mailto:[hidden email]> Tel: 678416758 |
Just an FYI: the ignore-if-* attributes apply to the variable being passed into the constraint, not the value in the database. To do what you want you'll need to have a != null and != "" as explicit conditions. -David On Feb 26, 2007, at 1:22 PM, Daniel Martínez wrote: > Hello all, > > So I thought this was easy, but it is giving me a hardtime :) > > I need to count rows where field "servicioImplicado" is not empty: > > <entity-count count-name="resumen.numero" entity- > name="SeguimientoCentro"> > <condition-list> > <condition-expr field-name="servicioImplicado" > operator="not-equals" value="null"/> > <condition-expr field-name="servicioImplicado" > operator="not-equals" value=""/> > <condition-expr field-name="servicioImplicado" > ignore-if-empty="true"/> > <condition-expr field-name="servicioImplicado" > ignore-if-null="true"/> > <condition-expr field-name="servicioImplicado" > operator="like" value=".+"/> > </condition-list> > </entity-count> > > I have tried with all this conditions separately and together, but > none > of them gives a correct result. > > the definition of field is: > > <field name="servicioImplicado" type="comment"></field> > > I am using Postgresql 8, SQL field definition is VARCHAR(255) > > Any ideas? > > Thanks in advance, > -- > ---------------------------------------------------------------------- > -- > Soluciones de Gestión para su empresa > eBusiness, ERP, CRM > ---------------------------------------------------------------------- > -- > *Daniel Martínez Martínez* > * * > Director de Proyectos > C/ Julia García Boután, 29 D 3ºB > 28022 Madrid > España * * > E-mail: [hidden email] > <mailto:[hidden email]> > Web: *www.paradisosistemas.es <http://www.paradisosistemas.es> > *Comercial: [hidden email] <mailto:[hidden email]> > Tel: 678416758 > > smime.p7s (3K) Download Attachment |
Free forum by Nabble | Edit this page |