Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dtPqs-0002A6-Au for pgsql-sql@arkaria.postgresql.org; Sun, 17 Sep 2017 03:02:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dtPqq-0002vE-Bl for pgsql-sql@arkaria.postgresql.org; Sun, 17 Sep 2017 03:02:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dtPpp-0001A7-Np for pgsql-sql@postgresql.org; Sun, 17 Sep 2017 03:01:29 +0000 Received: from mail-it0-x230.google.com ([2607:f8b0:4001:c0b::230]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dtPpm-0004u5-1I for pgsql-sql@postgresql.org; Sun, 17 Sep 2017 03:01:29 +0000 Received: by mail-it0-x230.google.com with SMTP id z8so5507447itc.2 for ; Sat, 16 Sep 2017 20:01:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=propaas-com.20150623.gappssmtp.com; s=20150623; h=to:from:subject:message-id:date:user-agent:mime-version :content-language; bh=TXyzHutiRGhDRazYuJFPG/l0CMGvZQx1eMW91I2EO/0=; b=0riyTuHAfZk1omuX5SOhCOsvLKgxl5tgM+PznL2SljB+fV5NNMaZ02S424+eR7LbOC NmNuSVHkxTTGUCSoLpNn7bNbYs/JXF8XCC3t6j98x9M/EjTDad4Oc4JmCjbAhpN9iPx7 iHOLtSV5hnZqPx10tpbrn49D+9aouAVZnZWwxhtRuykM7YQyITrhXWgvuOsR82mMcwG6 AfvYomF4+o0sKiWPBld+ZmsRtN03W4+mGMT6/z03It2mo1c93XeuQt70Q61eClywr8hC 1TpQHTqOXxKRmzEW1D1YvXg4FChd4oDssPDfe+jvyoIOvTD85iPp90qAvwoPGPFSiLZv 0loA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language; bh=TXyzHutiRGhDRazYuJFPG/l0CMGvZQx1eMW91I2EO/0=; b=H9UELiwTAYs3dlcCyONaG4Mf+T3tB/hmQZdDNXN5BT9pzMZ+aFCy6yiYirUfLi45jw vwERGQb3xyxRbrjonLB4+LnG3JuKSOwaClVH2+/f+foDfYcoEg/FswV4Fh7iKYE6O5hS Injv19SJc+n38LsGC58NS+f7lj7n/eGDqdKFPVaw5v5AjVz9BOrmVaEHQIo6BG14MaRi 2q29OCGO5h/3Wddf3ivRiIfNNwwOME0XO843MksKgZuxTSJZNdhYoDrF/Uv4la3J+E3r fMIlt68K+2OiE/4UyEvV/lcsQI+YUzlCLP6IG4myLN3BJ8DO5rV/JQ8s/mLqzl2cUkI1 lxJA== X-Gm-Message-State: AHPjjUg/UjaPqQ6lyRaaezjYGWI2H9PnMt5uvs6FkMVVfiel+ebMJ5bt 2DwHwl087CMjgnF1rjQIKw== X-Google-Smtp-Source: AOwi7QCU40ZIMq/adARbWNWanWV688nykPOHDKt5mjTZDFriT6/yGB2aAPpc6zbfIk5BKe/LAjCLDA== X-Received: by 10.36.161.3 with SMTP id y3mr11450357ite.57.1505617283573; Sat, 16 Sep 2017 20:01:23 -0700 (PDT) Received: from [10.1.0.190] (50-243-150-81-static.hfc.comcastbusiness.net. [50.243.150.81]) by smtp.gmail.com with ESMTPSA id 78sm466824itz.12.2017.09.16.20.01.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 Sep 2017 20:01:22 -0700 (PDT) To: pgsql-sql@postgresql.org From: PropAAS DBA Subject: Odd sql error .. Message-ID: Date: Sat, 16 Sep 2017 21:01:21 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="------------72833F5A940F9ED471E24A34" Content-Language: en-US List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org This is a multi-part message in MIME format. --------------72833F5A940F9ED471E24A34 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit I'm running this sql (see below) and I get this error: ERROR:  column "last_modified" does not exist LINE 3: ...repricefee"  , "tot_savings"  , "last_updated"  , "last_modi...                                                              ^ HINT:  There is a column named "last_modified" in table "mytable", but it can not be referenced from this part of the query. Thoughts? INSERT INTO myschema.mytable                (  "invoiceseq"  , "claseq"  , "clasub"  , "invby"  , "invrectyp"   , "invstatus"  , "invnum"  , "createdate"  , "postdate"  , "invdate"  , "invamt"  , "preinvnum"  , "preinvamt"  , "billed"  , "adjpaid"  , "expenses"  , "first_reviewsav"  , "first_reviewfee"  , "first_appealfee"  , "first_fraudsav"  , "first_fraudfee"  , "first_repricesav"  , "first_repricefee"  , "dent_reviewsav" , "dent_reviewfee"  , "dent_appealfee"  , "dent_fraudsav"  , "dent_fraudfee"  , "dent_repricesav"  , "dent_repricefee"  , "fac_reviewsav"  , "fac_reviewfee"  , "fac_appealfee"  , "fac_fraudsav"  , "fac_fraudfee"  , "fac_repricesav"  , "fac_repricefee"  , "tot_savings"  , "last_updated"  , "last_modified"  )                SELECT  "invoiceseq"  , "claseq"  , "clasub"  , "invby"  , "invrectyp"  , "invstatus"  , "invnum"  , "createdate"  , "postdate"  , "invdate" , " invamt"  , "preinvnum"  , "preinvamt"  , "billed"  , "adjpaid"  , "expenses"  , "first_reviewsav"  , "first_reviewfee"  , "first_appealfee"  , "first_fraudsav"  , "first_fraudfee"  , "first_repricesav"  , "first_repricefee"  , "dent_reviewsav"  , "dent_reviewfee"  , "dent_appealfee"  , "dent_fraudsav"  , "dent_fraudfee"  , "dent_repricesav"  , "dent_repricefee"  , "fac_reviewsav"  , "fac_reviewfee"  , "fac_appealfee"  , "fac_fraudsav"  , "fac_fraudfee"  , "fac_repricesav"  , "fac_repricefee"  , "tot_savings"  , "last_updated"  , "last_modified"                FROM old_schema.mytable --------------72833F5A940F9ED471E24A34 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit I'm running this sql (see below) and I get this error:

ERROR:  column "last_modified" does not exist
LINE 3: ...repricefee"  , "tot_savings"  , "last_updated"  , "last_modi...
                                                             ^
HINT:  There is a column named "last_modified" in table "mytable", but it can
not be referenced from this part of the query.



Thoughts?




INSERT INTO myschema.mytable
               (  "invoiceseq"  , "claseq"  , "clasub"  , "invby"  , "invrectyp"
  , "invstatus"  , "invnum"  , "createdate"  , "postdate"  , "invdate"  ,
"invamt"  , "preinvnum"  , "preinvamt"  , "billed"  , "adjpaid"  , "expenses"  ,
"first_reviewsav"  , "first_reviewfee"  , "first_appealfee"  , "first_fraudsav"  ,
"first_fraudfee"  , "first_repricesav"  , "first_repricefee"  , "dent_reviewsav"
, "dent_reviewfee"  , "dent_appealfee"  , "dent_fraudsav"  , "dent_fraudfee"  ,
"dent_repricesav"  , "dent_repricefee"  , "fac_reviewsav"  , "fac_reviewfee"  ,
"fac_appealfee"  , "fac_fraudsav"  , "fac_fraudfee"  , "fac_repricesav"  ,
"fac_repricefee"  , "tot_savings"  , "last_updated"  , "last_modified"  )
               SELECT  "invoiceseq"  , "claseq"  , "clasub"  , "invby"  , "invrectyp"  ,
"invstatus"  , "invnum"  , "createdate"  , "postdate"  , "invdate"  , "
invamt"  , "preinvnum"  , "preinvamt"  , "billed"  , "adjpaid"  , "expenses"  ,
"first_reviewsav"  , "first_reviewfee"  , "first_appealfee"  , "first_fraudsav"
 , "first_fraudfee"  , "first_repricesav"  , "first_repricefee"  ,
"dent_reviewsav"  , "dent_reviewfee"  , "dent_appealfee"  , "dent_fraudsav"  ,
"dent_fraudfee"  , "dent_repricesav"  , "dent_repricefee"  , "fac_reviewsav"  ,
"fac_reviewfee"  , "fac_appealfee"  , "fac_fraudsav"  , "fac_fraudfee"  , "fac_repricesav"  ,
"fac_repricefee"  , "tot_savings"  , "last_updated"  , "last_modified"
               FROM old_schema.mytable

--------------72833F5A940F9ED471E24A34--