I am trying to find a way to print the result taking into account if exists records in a table or not. If yes I should print all the records in a table, otherwise I should print only one record.
Example:
I have the Table Example:
| ColA | Colb | ColC |
|---|
If select count(*) from Example > 0 THEN Return
| ColA | Colb | ColC |
|---|---|---|
| 1 | VA1 | NULL |
| 2 | VB1 | NULL |
| 3 | NULL | VA2 |
If select count(*) from Example <= 0 THEN Return
| ColA | Colb | ColC |
|---|---|---|
| Result | NA | NA |
Is it possible to do something like that? I am doing the development using PRESTO.
Thanks you in advance