Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello -
I am using a loop script for my application that appears as such:
DIRECTORY 'Q:\qlkvw\prod\data\digital\social';
FOR EACH vFileName in FILELIST ('Q:\qlkvw\prod\data\digital\social\*.csv')
FROM [$(vFileName)] (txt, codepage is 1252, embedded labels, delimiter is ',', msq);
NEXT vFileName
I have an inline table that has a list of accounts, which I have the filed called taSCREENNME
Each File appears in this manner (from the data warehouse) YYYY-MM-aggr-SAB-xxxxxx, and there are 12 other thee letter variations
I want to extract the SAB (and the other three letter variations) from the filename and rename as taSCREENME to link the tables.
Is this possible within the script?
Thank you.
Is it always three dash away from the left? If that's true, you can use Subfield function here
SubField(taSCREENNME, '-',4) & '-' & SubField(taSCREENNME, '-', 5) as taSCREENNME
taSCREENNME is a field that I created in my in-line table. I need to re-create the FileName to match a part of the in-line table field.
Can you share some of the file names so that we can see the format they follow?
[ taID, taAccount, taSCREENNME
1, @account, SAB
2, @anotheracct, BIL
3, @accountthree, BAN];
This seems like expected output, right? How does the raw data looks like Evan?