Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
As per data shown, I have created CR_MONTH after renaming CREDIT_NOTE_DATE. If I write an expression using CR_MONTH instead original filed which is CREDIT_NOTE _DATE how possible it is? I may show you the expression written which is as follows!
if (CR_MONTH<>TR_MONTH,1,0) as [Flag Different CR_TR_MONTH],
Hope some body may help me out.
Thanks
Neville
LOAD
BRANCH,
CLASS_CODE,
PRODUCT_CODE,
POLICY_NO,
NAME_OF_INSURED,
CREDIT_NOTE_NO,
CREDIT_NOTE_DATE,
MONTH(CREDIT_NOTE_DATE) AS CR_MONTH,
if (CR_MONTH<>TR_MONTH,1,0) as [Flag Different CR_TR_MONTH],
PERIOD_FROM,
MONTH(PERIOD_FROM) AS TR_MONTH,
PERIOD_TO,
PREMIUM,
The script will fail because the field CR_MONTH will only exist after the reload of the table is complete. So for the same table, your expression should look like instead:
If(Month(CREDIT_NOTE_DATE) <> Month(PERIOD_FROM), 1, 0) AS [Flag Different CR_TR_MONTH]
Or do a preceding load.
Once you do this, later in the script, then yes, you can use CR_MONTH as a field.
The script will fail because the field CR_MONTH will only exist after the reload of the table is complete. So for the same table, your expression should look like instead:
If(Month(CREDIT_NOTE_DATE) <> Month(PERIOD_FROM), 1, 0) AS [Flag Different CR_TR_MONTH]
Or do a preceding load.
Once you do this, later in the script, then yes, you can use CR_MONTH as a field.
You can't do like above, But you may need this?
Note - If it throws error then you need to identify all the fields over preceding load because of Unique keys
Load *,
if (CR_MONTH<>TR_MONTH,1,0) as [Flag Different CR_TR_MONTH];
LOAD
BRANCH,
CLASS_CODE,
PRODUCT_CODE,
POLICY_NO,
NAME_OF_INSURED,
CREDIT_NOTE_NO,
CREDIT_NOTE_DATE,
MONTH(CREDIT_NOTE_DATE) AS CR_MONTH,
PERIOD_FROM,
MONTH(PERIOD_FROM) AS TR_MONTH,
PERIOD_TO,
PREMIUM,