Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have a field [QVDYEARWEEK] which has value in number which has year and week attach , how to break this into year and week
LOAD TABLE1
[Good Type],
[Good Description],
QVDYEARWEEK
from
---------------
I don't know if TABLE1 is a field name or the table you are loading, so assuming it is the table name, try using a preload statement:
TABLE1:
Load *,
Mid(QVDYEARWEEK,1,4) as YR,
Mid(QVDYEARWEEK,5,2) as WK;
LOAD
[Good Type],
[Good Description],
QVDYEARWEEK
I don't know if TABLE1 is a field name or the table you are loading, so assuming it is the table name, try using a preload statement:
TABLE1:
Load *,
Mid(QVDYEARWEEK,1,4) as YR,
Mid(QVDYEARWEEK,5,2) as WK;
LOAD
[Good Type],
[Good Description],
QVDYEARWEEK
or directly in the same load like this -
LOAD TABLE1
[Good Type],
[Good Description],
Num(Left(QVDYEARWEEK,4)) as Year,
Num(Right(QVDYEARWEEK,2)) as Weekno