Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying fetch value in NewC in similar way like NewB in the RANGE table but is always blank. Not sure what could the reason. Am I missing something very silly here.
Is it because i am using the square[] bracket here? Please suggest
Temp:
Load A,B,[C C]
FROM Source;
Let vNoRows = NoOfRows('Temp');
FOR i=0 to $(vNoRows)
Let vA=peek('A',$(i),'Temp');
let vB= peek('B',$(i),'Temp');
let vC= peek('[C C]',$(i),'Temp');
RANGE:
load distinct
PERIOD as Dates,
'$(vB)' as NewB,
'$(vC)' as NewC
resident FACT_ALL_PERIOD
WHERE f_PERIOD <='$(vDateLessthan)'
;
concatenate(_RANGE)
load distinct
BUSINESS_DATE AS Dates,
'$(vB)' as NewB,
'$(vC)' as NewC
FROM [..\..\..\QVD\EMP\EMP.qvd](qvd)
where TRIM(Date(DATE,'MM/DD/YYYY')) <='$(vDateLessthan)'
and TRIM(B) = '$(vB)'
;
//END IF;
NEXT
drop table Temp;
Remove the [ ]
Temp:
Load 'a' as A, 'b' as B, 'c' as [C C] AutoGenerate 1;
Load 'aa' as A, 'bb' as B, 'cc' as [C C] AutoGenerate 1;
Load 'aaa' as A, 'bbb' as B, 'ccc' as [C C] AutoGenerate 1;
Let vNoRows = NoOfRows('Temp');
FOR i=0 to $(vNoRows)
Let vA=peek('A',$(i),'Temp');
let vB= peek('B',$(i),'Temp');
let vC= peek('C C',$(i),'Temp');
trace $(vA) $(vB) $(vC);
NEXT
Remove the [ ]
Temp:
Load 'a' as A, 'b' as B, 'c' as [C C] AutoGenerate 1;
Load 'aa' as A, 'bb' as B, 'cc' as [C C] AutoGenerate 1;
Load 'aaa' as A, 'bbb' as B, 'ccc' as [C C] AutoGenerate 1;
Let vNoRows = NoOfRows('Temp');
FOR i=0 to $(vNoRows)
Let vA=peek('A',$(i),'Temp');
let vB= peek('B',$(i),'Temp');
let vC= peek('C C',$(i),'Temp');
trace $(vA) $(vB) $(vC);
NEXT