-
Oracle error message
Hi,
I have a query
select a.col1, a.col2, b.col1,
(select count(*) from table c) as count
from table a, table b
where a.col = b.col and
count > 0
that returns an error message "count: invalid identifier"
What is wrong with this query and what is the work around?
Thanks.
-
i would assume that count is a reserved word. try chaning your column name.
-
Changed the column name to test. Still getting the same error.
-
ok. played around with it a bit and here
it what i came up with:
1. join condition a.col = b.col
i am assuming you want to join :
a.col1 = b.col1
2. the order for count ... as count
is invalid
3. oracle doesn't seem to like a column
rename in a column list, put in
from clasue
4. don't need "table a, table b" just
name the tables in the from clause
select a.col1, a.col2, b.col1
from a, b,
(select count(*) as count from c)
where a.col1 = b.col1 and
count > 0
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|