Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Shir63
Contributor III
Contributor III

Adding new field & Where After Binary

Hi All,

after Binary call I would like to create a new field and then use it inside "Where" 

i tried this:

NoConcatenate
Sales2:
Load

*,

if(Sales.Brand = 'SM', '1', '0') as "Co Flag"

Resident Sales;

NoConcatenate
Sales3:
load *

resident Sales2

where "Co Flag" = '1';
drop Tables Sales3,Sales2;

but it does not work, can someone help me understand why?

 

 

Labels (3)
1 Reply
BrunPierre
Partner - Master
Partner - Master

Hi, it appears you dropping the output table. I'd rather you do it as below.

NoConcatenate
Sales2:
LOAD *
Where "Co Flag" = 1 ;

Load * ,
if(Sales.Brand = 'SM', '1', '0') as "Co Flag"

Resident Sales;

DROP Table Sales;