Macro Execution- Retreive 0 results

Database
Enthusiast

Macro Execution- Retreive 0 results

 In the script when i give the below where clause

Where COALESCE(colA,'')=COALESCE(NULLIFZERO(:col1)

,NULLIFZERO(:col2)) or (col1 in(NULL,'xyz));

when i pass the parameter to the macro in different scenarios:

(i) exec sam('')-- It shows all the values including NULL and XYZ

(ii) exec sam('xyz')-- It shows only values having XYZ

(iii) exec sam('A')-- It shows only values having XYZ. Which i do not want in my output. I expect the output as 0 results.

Please me with some logic to get 0 results. with the above given where clause

Tags (1)
1 REPLY
Teradata Employee

Re: Macro Execution- Retreive 0 results

Can you share the sample data values and required output?