Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have an excel document from which I load my data. But the excel sheet has contents as below:
Document Name:
Execution Date:
Execution Time:
:
:
:
etcetra
and then I have the actual data wihich I want to load.
Now, I remove all the above data in the [File Wizard: Type] and keep only the table. But the issue is, I want to append the year, Quarter and month from the above mentioned date in my script. Is it possible?
Can You share some sample data?
Can you load your sample file?
Hi,
Can you post the excel file with sample data..
Try adding
month(execution date) as month,
Q&ceil(month(execution date)/3) as quarter
To the code. this may help.. pls post sample..
You could load the full file and then split the Data with resident load.
Example:
FULL_DATA:
LOAD
A,
B,
C
FROM ...
;
META_DATA:
LOAD
B as DocumentName
Resident FULL_DATA
where A = 'Document Name:'
;
DATA
LOAD
A as ColumnA
Resident FULL_DATA
where A <> 'Document Name:'
Hi,
Please share any date if possible other wise do this as you say you want to load year, Quarter and month from above table so do some thing like
Load
Yourdate_Field,
Year(Yourdate_Field) as Year,
Month(Yourdate_Field) as Month,
'Q'&Ceil(Yourdate_Field/3) as Quarter
from Table;
and link this table with above table not need to join.
Hope this helps
Thanks & Regards
Hi,
You can do this in your existing table also add this code only
Yourdate_Field,
Year(Yourdate_Field) as Year,
Month(Yourdate_Field) as Month,
'Q'&Ceil(Yourdate_Field/3) as Quarter
Hope this helps
Thanks & Regards
The Sample file is attached.
I hope the issue is understood correctly..