Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Can anyone please help me in writing the load script?
Please see the attached excel file i want column G and H to be created in load script and not in Excel with formula's as this is a sample data only
Try:
Temp:
LOAD [Product Id], [Test Date], [Test 1], [Test 2], [Test 3], [Test 4]
FROM comm107533.xlsx (ooxml, embedded labels, table is Sheet1);
Result:
LOAD *
, if(Previous([Product Id]) = [Product Id], rangesum(1,peek('Position')),1) as Position
, rangesum(if([Test 1]='No',1,0)
,if([Test 2]='No',1,0)
,if([Test 3]='No',1,0)
,if([Test 4]='No',1,0)) as [Total No's]
Resident Temp
Order by [Product Id], [Test Date];
drop table Temp;
See attached qvw.
Try:
Temp:
LOAD [Product Id], [Test Date], [Test 1], [Test 2], [Test 3], [Test 4]
FROM comm107533.xlsx (ooxml, embedded labels, table is Sheet1);
Result:
LOAD *
, if(Previous([Product Id]) = [Product Id], rangesum(1,peek('Position')),1) as Position
, rangesum(if([Test 1]='No',1,0)
,if([Test 2]='No',1,0)
,if([Test 3]='No',1,0)
,if([Test 4]='No',1,0)) as [Total No's]
Resident Temp
Order by [Product Id], [Test Date];
drop table Temp;
See attached qvw.
Thanks Gysbert Wassenaar