Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I try to determine the prefix set on the file name.
On the first hand, i have a list of prefix available and already loaded (table FilesPrefixs)
On the other hand, i have a folder containing a list of files as Input.
The goal is to determine what is the correct prefix to execute the correct SUB.
What i have done at this time :
DeterminePrefixTemp:
LOAD FileNamePrefix
RESIDENT FilesPrefixs
WHERE SubStringCount(SubField($(vFileName),'-',1), FileNamePrefix) > 0;
For example :
> vFileName contain ABCD1243-20120101-195312
> FileNamePrefix is supposed to contain : ABCD
The result is an error : Unknown Field : ABCD
I don't understand where is my problem.
Do you have an idea on what i'm doing wrong.
Thanks a lot for your help.
HI
SubStringCount(SubField('$(vFileName)','-',1), FileNamePrefix)
I think error you occur, field not found <ABCD>..
if not, please check the data in fieldnameprefix
That helps
Your table FilesPrefixs does not have a field named ABCD. So LOAD ABCD ....etc fails.
HI
SubStringCount(SubField('$(vFileName)','-',1), FileNamePrefix)
I think error you occur, field not found <ABCD>..
if not, please check the data in fieldnameprefix
That helps
The field i'm loading from FilesPrefixs is : FileNamePrefix not ABCD
and i want to identify the row preseting the value ABCD.
Hi Mayil,
you're right, this was the problem.
Thanks a lot.