开发者

Queries on Views cause strange errors in Oracle SQL Developer

I have to write an SQL command which queries a View in a database. I did not create them myself nor do I have access to the tables. Only the views are provided t开发者_运维百科o us by our software manufacturer. I'm using Oracle SQL Developer 3.0 to query. The following command works flawlessly as expected:

SELECT * FROM EDBADM.VW_THEVIEWNAME

However, when I ask for a certain column (called filename) not to contain any null values:

SELECT * FROM EDBADM.VW_THEVIEWNAME WHERE filename IS NOT NULL;

.... I get the following error:

ORA-00979:
00979. 00000 -  "not a GROUP BY expression"
*Cause:    
*Action:
Error in line: 3 column: 75

This seems implausible to me as no aggregation is involved in my part of the query. Also, when I query for filename to match a certain pattern:

SELECT * FROM EDBADM.VW_THEVIEWNAME WHERE filename LIKE 'abc%'

... I still get result rows where filename is NULL.

Could it be possible that the underlying, inaccessible definition of the view is incorrect, leading to this strange behavior??


Could you post the creation script of your view? Is the column called filename explicitally declared in the view called VW_THEVIEWNAME?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜