Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
using this i want to filter data :
condition1) if two '_' (Underscore's) are there , i want middle value
condition 2) if one '_' score there i want first value before underscore
condition 3) if there is no underscore i want the same value as it is,
all three conditions should be for that field ,, save result in new field.
GROUPNAME
EGR_EGTS_BATCH
IPG_PMRD_ADM
IPG_PMDE_ADM
GIT_OVSC_ADM
GIT_OVSC_BATCH
ITIO_ITR_BATCH
Srinivas_Vandrasi
EGIT_EGSD_BATCH
EGIT_PRAO_BATCH
EGIT_EGSD_ADM
PPS_PCSC_ADM
GREP_HRPY_ADM
GREP_HRPY_BATCH
ITIO_ITR_BATCH
IPG_USAG_ADM
BASL_ADM
EGIT_PRAO_ADM
ITIO_ITR_ADM
GIT_MDM_UPU
EDS_SXD_ADM
GIT_EDW_BATCH
IPG_LOT_BATCH
Administrator
GIT_MDM_ADM
PPS_PCSC_BATCH
Thanks,
sekhar.
Hi,
Try below code:
test:
LOAD *, if(len(SubField(GROUPNAME,'_',SubStringCount(GROUPNAME,'_')))=0,GROUPNAME,SubField(GROUPNAME,'_',SubStringCount(GROUPNAME,'_'))) as test Inline
[
GROUPNAME
EGR_EGTS_BATCH
IPG_PMRD_ADM
IPG_PMDE_ADM
GIT_OVSC_ADM
GIT_OVSC_BATCH
ITIO_ITR_BATCH
Srinivas_Vandrasi
EGIT_EGSD_BATCH
EGIT_PRAO_BATCH
EGIT_EGSD_ADM
PPS_PCSC_ADM
GREP_HRPY_ADM
GREP_HRPY_BATCH
ITIO_ITR_BATCH
IPG_USAG_ADM
BASL_ADM
EGIT_PRAO_ADM
ITIO_ITR_ADM
GIT_MDM_UPU
EDS_SXD_ADM
GIT_EDW_BATCH
IPG_LOT_BATCH
Administrator
GIT_MDM_ADM
PPS_PCSC_BATCH
];
HTH
sushil
Thanku,
Sushil.
Load *,SubField(GROUPNAME,'_',Rangemax(SubStringCount(GROUPNAME,'_'),1)) Inline [
GROUPNAME
EGR_EGTS_BATCH
Srinivas_Vandrasi
Administrator ];