Lazarus

Free Pascal => General => Topic started by: jojo86 on February 15, 2019, 12:02:56 am

Title: TSQLQuery.Filter problem with select iif()
Post by: jojo86 on February 15, 2019, 12:02:56 am
Hi,

I have a sql query with a iif() inside the select.
The filter method can't works with this calculated field.

Filter works with all my other fields, but not with the statut field :
Code: Pascal  [Select][+][-]
  1. select Name, Adresse, iif(xyz<opt, 'OK', 'KO') as Statut
  2.  

How can I solve my problem ?
Thanx



Title: Re: TSQLQuery.Filter problem with select iif()
Post by: dsyrios on February 15, 2019, 06:13:45 am
Maybe, try this...

Code: Pascal  [Select][+][-]
  1. SELECT Name, Adresse, CASE WHEN xyz<opt THEN 'OK' ELSE 'KO' END AS Statut  FROM ...
  2.  
TinyPortal © 2005-2018