Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community
I want to insert Weekdays Mon, Tue, Wed, Thu, Wed, Thu, Fri, Sat where Nulls are coming in Weekdays column
Logic to Apply:
1): If Flag='DC' than insert Weekdays Mon, Tue, Wed, Thu, Wed, Thu, Fri
2): If Flag='IDC' than insert Weekdays Mon, Tue, Wed, Thu, Wed, Thu, Fri, Sat
Original Data:
Required Data:
PFA.
Regards
Av7eN
hi try below for Little more simpler without loops and concatenation
Load *,
if(len(trim(WeekDays))=0,if(Flag='IDC',SubField('Mon-Tue-Wed-Thu-Fri-Sat','-'),SubField('Mon-Tue-Wed-Thu-Fri','-')),WeekDays) as FINALWEEKDAYS
from PATH;
Prem & Tresesco Sir I like both of yours Approach.
Great Work of Mind.
Special Thanks to Jagan Mohan Sir for identifying duplicates in my Logic.
I was in so hurry that I missed that part of Duplicate Recoords. Later learnt that I was wrong.
Thank you All for providing such wonderful solutions and that too instantly.
Reagards
Av7eN