Several times now I've gotten the error "ERROR: syntax error at or near CREATE". I've played around with the formatting but can't seem to fix it. I'm hoping it's something minor someone can point out to me. Thanks in advance for the help!
-- View: mock_tool_cal
-- DROP VIEW mock_tool_cal;
CREATE OR REPLACE VIEW mock_tool_cal AS
SELECT toolcal."control#" AS old_control_number
FROM staging.agg_staging_toolcal toolcal
ALTER TABLE mock_tool_cal
OWNER TO postgres;
CREATE OR REPLACE VIEW.