Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
venkatasuresh
Creator
Creator

FLAG Creation with YES and NO

Hi Experts,

I need your help to create a flag with YES&NO options,

Input data like below:

Product:

LOAD * INLINE [
PRODUCT
2000
2001
5000
5001
5002
5003
5004
5011
5012
5015
5016
5017
5018
5021
5022
5090
7000
7001
8000
8003
8004
8006
8008
8011
8012
8020
8030
8050
9000
9001
9600
9601
]; 

Expected output:

Here if we select the ‘Yes’ it will display  results including “8006” (basically without making any changes on extracted data set) related information, If you select ‘No’ it will exclude “8006” related information and it will display reaming all Product info.

Ex: Under flag 'YES

 '2000','2001','5000','5001','5002','5003','5004','5011','5012','5015,'5016','5017','5018','5021','5022','5090',
'7000','7001','8000','8003','8004','8008','8011','8012','8020','8030','8050','9000','9001','9600','9601','8006'

      Under flag 'NO

'2000','2001','5000','5001','5002','5003','5004','5011','5012','5015,'5016','5017','5018','5021','5022','5090',
'7000','7001','8000','8003','8004','8008','8011','8012','8020','8030','8050','9000','9001','9600','9601'

 

Thanks,

Suresh V.V

Labels (1)
2 Replies
NitinK7
Specialist
Specialist

Hi

try below

TABLE:

load 

    product

   'YES' as Flag

from filepath;

concatenate

load 

    product

   'NO' as Flag

from filepath

where product<> '8006';

Brett_Bleess
Former Employee
Former Employee

If the response below was what you needed, we would appreciate it if you would close the thread by using the Accept as Solution button on that post, but if you still have further questions, or would like to further clarify the use case etc., please leave an update post.  If you figured out something else, consider posting what that was and then use the button to mark that as the solution to close the thread.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.