title: SQL Error ORA-00904: invalid identifier
body: <p>I am trying to run this sql in Oracle SQL developer and I get the error of </p>
  
  <pre><code>ORA-00904: "I"."SZ": invalid identifier
  00904. 00000 -  "%s: invalid identifier"
  *Cause:    
  *Action:
  Error at Line: 13 Column: 122
  </code></pre>
  
  <p>I am not sure what the issue is.  A friend of mine was able to run this sql he sent me with no problem.  I am using a VM as well.</p>
  
  <p>Here is my SQL:</p>
  
  <pre><code> SELECT 
                                oi.ID              AS ID, 
                                r.MARKET_CENTER_ID AS MARKET_CENTER_ID, 
                                SUBSTR(('0000' || r.MARKET_CENTER_ID),-4,4) AS MARKET_CENTER_NUMBER, 
                                r.ID               AS ROUTE_ID, 
                                r.NBR           AS ROUTE_NUMBER, 
                                oh.WORK_ORDER_DATE AS ORDER_DATE, 
                                c.NBR           AS CID, 
                                c.NAME             AS CUSTOMER_NAME, 
                                c.GARMENT_MARK     AS GID, 
                                oi.WEARER_NUMBER   AS WEARER_NUMBER, 
                                TRIM(oi.WEARER_FIRST_NAME || ' ' || oi.WEARER_LAST_NAME) AS WEARER_NAME, 
                                (CASE WHEN (i.ID) IS NULL THEN oi.ITEM_NUMBER ELSE i.CATEGORY || i.STYLE || i.COLOR || i.SZ END) AS ITEM_NUMBER, 
                                oh.INVENTORY_CODE             AS INVENTORY_CODE, 
                                NVL(oi.RTS_QTY,0)          AS EXPECTED_RTS, 
                                NVL(oi.RTS_RTS_QTY,0)      AS RTS_QTY, 
                                NVL(oi.RTS_RUIN_QTY,0)     AS RTS_RUIN, 
                                NVL(oi.RTS_ABUSE_QTY,0)    AS RTS_ABUSE, 
                                NVL(oi.RTS_RTW_QTY,0)      AS RTW, 
                                NVL(oi.RTS_LOSS_QTY,0)     AS RTS_LOSS, 
                                NVL(oi.RUIN_QTY,0)         AS RUIN, 
                                NVL(oi.LOSS_QTY,0)         AS LOSS, 
                                NVL(oi.ADJ_QTY,0)          AS ADJ, 
                                (CASE WHEN EC.ID IS NULL OR c.EC_STATUS &lt;&gt; 'A' THEN 0 ELSE 1 END)       AS EASY_CARE_LINE, 
                                (CASE WHEN oi.HH_MODULE = 'ExcessMerchandise' THEN 1 ELSE 0 END) AS EXCESS_MERCH, 
                                ic.INV_DESC AS INV_DESC  
                              FROM route r 
                                INNER JOIN customer c 
                                  ON c.ROUTE_ID = r.ID 
                                INNER JOIN order_header oh 
                                  ON oh.CUSTOMER_ID = c.ID 
                                INNER JOIN order_item oi 
                                  ON oi.ORDER_HEADER_ID = oh.ID 
                                LEFT JOIN inventory_code ic 
                                  ON ic.INV_CODE = oh.INVENTORY_CODE 
                                LEFT JOIN customer_item ci 
                                  ON ci.ID = oi.CUSTOMER_ITEM_ID 
                                     AND NOT oi.EXCHANGE_ITEM_ID IS NULL 
                                LEFT JOIN item i 
                                  ON i.ID = ci.ITEM_ID 
                                LEFT JOIN customer_item ci2 
                                  ON ci2.ID = oi.CUSTOMER_ITEM_ID 
                                LEFT JOIN item i2 
                                  ON i2.ID = ci2.ITEM_ID 
                                LEFT JOIN ECARE_ITEMS EC 
                                  ON EC.CUSTOMER_ID = c.ID 
                                    AND EC.ITEM_CATEGORY = i2.CATEGORY 
                                    AND EC.ITEM_STYLE = i2.STYLE 
                                    AND EC.ITEM_COLOR = i2.COLOR 
                                    AND EC.IE_FLAG = 'Y' 
                                    WHERE 
  
                               (CASE WHEN EC.ID IS NULL OR c.EC_STATUS &lt;&gt; 'A' THEN 0 ELSE 1 END) = 1
                              AND oh.INVENTORY_CODE != '3G'
                                  AND oh.STATUS_ID = 3;
  </code></pre>