samedi 20 juin 2020

SQL if in where

I want to write a sql query like this, below the logic:

when nn not null then dn like 'id=$nn$%' 
when user_id = $usrid$
when field1 not null then field1= $wcsid;

I'm writing it for splunk search.

I want to compare 3 three inputs and modify the query to current input which is not null.

Aucun commentaire:

Enregistrer un commentaire