--- a/exportData.csv.php +++ b/exportData.csv.php @@ -10,7 +10,7 @@ case when "supplierABN" != 0 THEN "supplierABN"::text ELSE "supplierName" END) as supplierID, (\'https://www.tenders.gov.au/?event=public.advancedsearch.keyword&keyword=CN\'::text || "CNID"::text) as sourceURL -FROM contractnotice join agency on contractnotice."agencyName"=agency."agencyName" where "childCN" = 0' +FROM contractnotice join agency on contractnotice."agencyName"=agency."agencyName" where "childCN" is null' , array(PDO::ATTR_CURSOR => PDO::FETCH_ORI_NEXT)); // "supplierCity","supplierPostcode","supplierCountry","contactPostcode", // (substr( "categoryUNSPSC"::text, 0, 2 ) || \'0000000\'::text) as "categoryUNSPSClv1", "categoryUNSPSC", (substr( "categoryUNSPSC"::text, 0, 3 ) || \'000000\'::text) as "categoryUNSPSClv2" "categoryUNSPSC", (substr( "categoryUNSPSC"::text, 0, 4 ) || \'00000\'::text as "categoryUNSPSClv3")