Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
brijesh1991
Partner - Specialist
Partner - Specialist

Flag Creation in script

Hi all,

I wanted to create a flag at script level.
My data is like this:
Load * inline
[
AppNo, Date
123, 12/11/2013
123,
124,12/10/2012
124, 10/05/2012
125,
125
126,10/12/2012
];

There are multiple dates against a single AppNo, I wanted to create a flag against AppNo. if any one Date is null against AppNo, then Flag=N else Y

So my output should be like this:

AppNo, Date, Flag
123, 12/11/2013, N
123,                  ,N
124,12/10/2012, Y
124, 10/05/2012, Y
125,                  , N
125                  , N
126,10/12/2012, Y

Your help is valuable to me. . .

Best Regards,
BRIJESH

1 Solution

Accepted Solutions
tresesco
MVP
MVP

PFA.

Is this what you want?

View solution in original post

5 Replies
tresesco
MVP
MVP

try this:

Load

          AppNo,

          Date,

          If (Isnull(Date), 'N', 'Y') as Flag

From  <>;

brijesh1991
Partner - Specialist
Partner - Specialist
Author

thanks tres qv. . .

AppNo, Rcvd
123, 12/11/2012
123,
Since there are multiple dates against each AppNo, for above case your solution will give flag 'Y'. Actually it should be 'N' I think we need to do some group by. but getting some script error. Try from your end and let me know if u find some fruit! Best Regards, Brijesh

Not applicable

Hi,

See the attachment.

tresesco
MVP
MVP

PFA.

Is this what you want?

brijesh1991
Partner - Specialist
Partner - Specialist
Author

Hey tres. .. . This is exactly what I was looking for. . . Thanks buddy and FindOneOf is nice function at time of deriving such complicated Flag. . . Really impressed. . . Thanks again. . . Brijesh :))