Project

General

Profile

« Previous | Next » 

Revision 8093

inputs/FIA/*/postprocess.sql: Use functions.to_global_col_names() to ensure that all column names are globally unique. This makes it easy to join the tables together without worrying about column name collisions.

View differences:

postprocess.sql
1
SELECT functions.create_if_not_exists($$ALTER TABLE "SUBPLOT" ADD CONSTRAINT "SUBPLOT.unique" UNIQUE ("STATECD", "UNITCD", "COUNTYCD", "PLOT", "INVYR", "SUBP")$$);
1
SELECT functions.to_global_col_names(:table_str);
2

  
3
SELECT functions.create_if_not_exists($$ALTER TABLE "SUBPLOT" ADD CONSTRAINT "SUBPLOT.unique" UNIQUE ("SUBPLOT.STATECD", "SUBPLOT.UNITCD", "SUBPLOT.COUNTYCD", "SUBPLOT.PLOT", "SUBPLOT.INVYR", "SUBPLOT.SUBP")$$);

Also available in: Unified diff