Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to load values where a year is matching, but instead of loading values where a year is matching, the code is assigning the year value of one to another and thus loading everything.
the code I am using is:
[ExistingMonths]:
LOAD DISTINCT
[Month]
FROM
[ExistingMonths.qvd]
(qvd)
WHERE
[Month] = '$(vNewMonth)';
LET vMonth = PEEK('Month',0);
The vNewMonth variable is taking value from the source file, which is correct.
Before the where statement values are different, but after the where statement, [Month] field takes the value of vNewMonth variable and hence the vMonth variable as well.
Any help?
Hi Y B
I am not sure what you expect to get...
It is obvious that if you LOAD [Month] from a qvd and have a WHERE clause stating that [Month] = '$(vNewMonth)'
the [Month] field can only have the same value as vNewMonth. (Or the table will be empty if no matching [Month] is found in the qvd.
/gg
can u come up with clear explination ,
there is lot of confusion
what is the value of vnewmonth?
no, but my source file doesn't have that month. So I am expecting no rows and hence vMonth = ' ' (Null value).
However, the where clause is assigning the new month values to existing ones and loading everything.
Even I am confused.
Can you post the entire script