Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Can Anyone Help me on below Expression Please do the needful????
Kindly help me how to compare two date:
----------------------------------------------------------------------------------------------------------------------
Example:
let vCurrMonthYear=MonthName(Today());
LOAD RES_ID,
RES_NAME,
month(Date) as MonthName
FROM
(biff, embedded labels, table is Sheet1$);
IF(vMonth=MonthName) then
STORE ResourceFile INTO E:\ResourceFile.qvd (QVD);
Else
STORE ResourceFile INTO E:\Resourcee.qvd (QVD);
Endif
----------------------------------------------------------------------------------------------------------------------
After compare vMonth=MonthName, MonthName giving me Null Values.
in Monthname not carry value.
Kindly help me.
Regards
Ravi
Hi Ravi,
If you call a variable, use following syntax for the variable: $(vMonth).
Your expression (comparison) would then be
IF $(vMonth) = MonthName THEN ...
Hope this helps you further.
Regards,
sebablum
Could you sent an example of your Date.xls?
First, it is not possible to simply get the value of 'MonthName' like this.
As it is a column name, in the loading script, it must return NULL in MonthName.
I think what you try to do is to split the data into two files.
So, I think you should use two tables to keep the data using 'where'
Whats your vMonth variable holds???
Sivaraj S
Hi,
Can you explain what your trying to do here by comparing dates?What value vMonth variable has?
Celambarasan
Hello Friends,
I am comparing both loaded data field MonthName and Current Month Name.
Only I comparing both date.
Can you Please help me out??
Regards
Ravi Gupta
can you check this
let vmonth=month(today());
if('$(vmonth)=monthname')
Sivaraj S
Hi,
Check with this approach.
let vCurrMonthYear=MonthName(Today());
ResourceFile:
LOAD RES_ID,
RES_NAME,
month(Date) as MonthName
FROM
(biff, embedded labels, table is Sheet1$) where month(Date) = vCurrMonthYear;
STORE ResourceFile INTO E:\ResourceFile.qvd (QVD);
Drop Table ResourceFile;
Resourcee:
LOAD RES_ID,
RES_NAME,
month(Date) as MonthName
FROM
(biff, embedded labels, table is Sheet1$) where month(Date) <> vCurrMonthYear;
STORE Resourcee INTO E:\Resourcee.qvd (QVD);
Drop Table Resourcee;
Hope this your need
Celambarasan
Celambarasan is correct.
I believe it is what you need.