Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Resident Load

Hi All,

I am struggling with the following code, can anyone assist in letting me know where I am going wrong. Its the resident load bit that's not quite working. Also when doing an order by, can I use the aliases from the previous table?

Data1:

LOAD [Submission Id],

     [Fieldworker Name] as [Field staff],

     [Fieldworker Id],

     [Received Date],

     gps_conf,

     gps_conf_Location_Longitude,

     gps_conf_Location_Latitude,

     gps_conf_Location_Altitude,

     gps_conf_Location_Time,

     Bike,

     Issue,

     Odometer,

     Km as Reading,

     Date,

     [Adjstd Km],

     Mileage

   

FROM

(ooxml, embedded labels, table is [1 Rainfall Odometer])

WHERE(Year(Date) = '2014' And Mileage > '0' And Mileage < '10000');

Data:

NoConcatenate

LOAD *

Resident Data1

Order by [Fieldworker Name] asc, Date asc,Km asc;

Thank you

H

1 Solution

Accepted Solutions
its_anandrjs

Write load script like below script and  asc one time only

Data1:

LOAD [Submission Id],

     [Fieldworker Name] as [Field staff],

     [Fieldworker Id],

     [Received Date],

     gps_conf,

     gps_conf_Location_Longitude,

     gps_conf_Location_Latitude,

     gps_conf_Location_Altitude,

     gps_conf_Location_Time,

     Bike,

     Issue,

     Odometer,

     Km as Reading,

     Date,

     [Adjstd Km],

     Mileage

FROM

(ooxml, embedded labels, table is [1 Rainfall Odometer])

WHERE(Year(Date) = '2014' And Mileage > '0' And Mileage < '10000');

Data:

NoConcatenate

LOAD *

Resident Data1

Order by

[Field staff],Date, Reading asc;

DROP Table Data1;

Note:- [Fieldworker Name] filed get renamed to [Field staff] so use the new name and also Reading, and drop the previous table other wise it is created synthetic keys.

View solution in original post

3 Replies
its_anandrjs

Write load script like below script and  asc one time only

Data1:

LOAD [Submission Id],

     [Fieldworker Name] as [Field staff],

     [Fieldworker Id],

     [Received Date],

     gps_conf,

     gps_conf_Location_Longitude,

     gps_conf_Location_Latitude,

     gps_conf_Location_Altitude,

     gps_conf_Location_Time,

     Bike,

     Issue,

     Odometer,

     Km as Reading,

     Date,

     [Adjstd Km],

     Mileage

FROM

(ooxml, embedded labels, table is [1 Rainfall Odometer])

WHERE(Year(Date) = '2014' And Mileage > '0' And Mileage < '10000');

Data:

NoConcatenate

LOAD *

Resident Data1

Order by

[Field staff],Date, Reading asc;

DROP Table Data1;

Note:- [Fieldworker Name] filed get renamed to [Field staff] so use the new name and also Reading, and drop the previous table other wise it is created synthetic keys.

Not applicable
Author

Perfect, thank you Anand

its_anandrjs

Thanks and Welcome