diff --git a/R/get_extended_data_from_NASIS_db.R b/R/get_extended_data_from_NASIS_db.R index 5846c3a8..cb18d36f 100644 --- a/R/get_extended_data_from_NASIS_db.R +++ b/R/get_extended_data_from_NASIS_db.R @@ -386,7 +386,8 @@ LEFT OUTER JOIN ( q.sitepm <- "SELECT siteiidref as siteiid, seqnum, pmorder, pmdept, pmdepb, pmmodifier, pmgenmod, pmkind, pmorigin FROM sitepm_View_1 AS spm - INNER JOIN site_View_1 AS s ON spm.siteiidref = s.siteiid;" + INNER JOIN site_View_1 AS s ON spm.siteiidref = s.siteiid + ORDER BY spm.siteiidref, pmorder;" # toggle selected set vs. local DB if (SS == FALSE) {