"%s: invalid identifier" during Over(Partition by..) [message #601595] |
Fri, 22 November 2013 10:57 |
|
airnel48
Messages: 1 Registered: November 2013 Location: United States
|
Junior Member |
|
|
Any idea why I'm receiving the invalid identifier error? It's my first time using Over(Partition by
SELECT
a.day AS date
b.location AS region,
c.item AS product,
d.details AS description,
SUM(a.hours) over(partition BY a.day, b.location, c.item, d.details) AS item_hours,
SUM(a.hours) over(partition BY a.day, b.location, d.details) AS hours,
FROM Time_data a,
Geography_data b,
Items_data c,
Description_data d
WHERE a.code = b.code
AND a.code = c.code
AND a.code = d.code
Error report:
SQL Error: ORA-00904: "C"."item": invalid identifier
|
|
|
Re: "%s: invalid identifier" during Over(Partition by..) [message #601597 is a reply to message #601595] |
Fri, 22 November 2013 11:06 |
|
BlackSwan
Messages: 26766 Registered: January 2009 Location: SoCal
|
Senior Member |
|
|
airnel48 wrote on Fri, 22 November 2013 08:57Any idea why I'm receiving the invalid identifier error? It's my first time using Over(Partition by
SELECT
a.day AS date
b.location AS region,
c.item AS product,
d.details AS description,
SUM(a.hours) over(partition BY a.day, b.location, c.item, d.details) AS item_hours,
SUM(a.hours) over(partition BY a.day, b.location, d.details) AS hours,
FROM Time_data a,
Geography_data b,
Items_data c,
Description_data d
WHERE a.code = b.code
AND a.code = c.code
AND a.code = d.code
Error report:
SQL Error: ORA-00904: "C"."item": invalid identifier
"C"."item" is different from c.item
I suspect that some portion of above is not an actual COPY & PASTE of code that threw posted error
|
|
|
|