I have data in an MS Access database that I have transferred to a PostgreSQL database. I would like to repeat those things which I have created in PostgreSQL in MS Access. Keeping my SQL table of mine in my table.
select GENERAL_CAUSE_NFD [due classroom], as DFS_FIRE_ARCHIVE.FIRE_YEAR [years], OBJECTIVES_NFD [Response category], as the total count (DFS_FIRE_ARCHIVE.REGION) (((DFS_FIRE_ARCHIVE insider looking at DFS_FIRE_ARCHIVE.GENERAL_CAUSE = GENERAL_CAUSE_ORDER.GENERAL_CAUSE GENERAL_CAUSE_ORDER) insider Join the DFS_FIRE_ARCHIVE.OBJECTIVE = OBJECTIVE_ORDER.OBJECTIVE OBJECTIVE_ORDER) OBJECTIVE_ORDER.OBJECTIVE = on OBJECTIVES_NFD Join insider OBJECTIVES_NFD.OBJECTIVE) GENERAL_CAUSE_ORDER on GENERAL_CAUSE_NFD Join insider. GENERAL_CAUSE = GENERAL_CAUSE_NFD by GENERAL_CAUSE_NFD.GENERAL_CAUSE GROUP. [Due class], DFS_FIRE_ARCHIVE.FIRE_YEAR, OBJECTIVES_NFD. [Response category], DFS_FIRE_ARCHIVE.GENERAL_CAUSE, DFS_FIRE_ARCHIVE.OBJECTIVE, GENERAL_CAUSE_ORDER.ORDER, OBJECTIVE_ORDER.ORDER, DFS_FIRE_ARCHIVE.FIRE_MGT_ZONE, having DFS_FIRE_ARCHIVE.FIRE_TYPE (((DFS_FIRE_ARCHIVE.FIRE_YEAR) = 2009) and ((DFS_FIRE_ARCHIVE.FIRE_MGT_ZONE) = "INT" ) And ((DFS_FIRE_ARCHIVE.FIRE_ type) = "IFR")) GENERAL_CAUSE_ORDER.ORDER, OBJECTIVE_ORDER.ORDER, DFS_FIRE_ARCHIVE.OBJECTIVE; Trouble is when I try to execute this query in PostgreSQL I try to get syntax errors.
Not sure about PostgreSQL, but in Oracle change to double quotes square braces . In addition, this may complain because you are grouped based on the columns which are not in your results set. ..
GENERAL_CAUSE_NFD "cause class", DFS_FIRE_ARCHIVEkFIRE_YEAR as "old", OBJECTIVES_NFD "Answer: If you like all groups, as well as fields for your query to return Change the category ", DFS_FIRE_ARCHIVE.GENERAL_CAUSE, DFS_FIRE_ARCHIVE.OBJECTIVE, GENERAL_CAUSE_ORDER.ORDER, OBJECTIVE_ORDER.ORDER, DFS_FIRE_ARCHIVE.FIRE_MGT_ZONE, DFS_FIRE_ARCHIVE.FIRE_TYPE, computation (DFS_FIRE_ARCHIVE.REGION) from" Total "to ((DFS_FIRE_ARCHIVE Insert included Get GENERAL_CAUSE_ORDER at DFS_FIRE_ARCHIVE.GENERAL_CAUSE = GENERAL_CAUSE_ORDER.GENERAL_CAUSE) Join DFS_FIRE_ARCHIVE.OBJECTIVE = OBJECTIVE_ORDER.OBJECTIVE OBJECTIVE_ORDER) Join OBJECTIVE_ORDER.OBJECTIVE = OBJECTIVES_NFD.OBJECTIVE on OBJECTIVES_NFD Join GENERAL_CAUSE_NFD GENERAL_CAUSE_ORDER.GENERAL_CAUSE = GENERAL_CAUSE_NFD.GENERAL_CAUSE GROUP GENERAL_CAUSE_NFD. "Cause Class", DFS_FIRE_ARCHIVE FIRE_YEAR, OBJECTIVES_NFD "Response category", DFS_FIRE_ARCHIVE.GENERAL_CAUSE, DFS_FIRE_ARCHIVE.OBJECTIVE, GENERAL_CAUSE_ ORDER.ORDER, OBJECTIVE_ORDER.ORDER, DFS_FIRE_ARCHIVE.FIRE_MGT_ZONE, DFS_FIRE_ARCHIVE.FIRE_TYPE HAVING (((DFS_FIRE_ARCHIVE.FIRE_YEAR) = 200 9) and ((DFS_FIRE_ARCHIVE.FIRE_MGT_ZONE) = " INT ") and ((DFS_FIRE_ARCHIVE.FIRE_TYPE) =" IFR ")) GENERAL_CAUSE_ORDER.ORDER by order, OBJECTIVE_ORDER.ORDER, DFS_FIRE_ARCHIVE.OBJECTIVE; share and enjoy.
Comments
Post a Comment