mpluse
mpluse

Reputation: 1875

calling view in SQL to find records

I created a view article_avis_favorable but when I made this query to search articles but using some specifications:

SELECT blabla
FROM Table
WHERE id_article in article_avis_favorable;

It displays an error message Erreur SQL : ORA-00904: "ARTICLE_AVIS_FAVORABLE" : identificateur non valide 00904. 00000 - "%s: invalid identifier"

Upvotes: 0

Views: 144

Answers (1)

TheEwook
TheEwook

Reputation: 11117

Just consider your view as a table

SELECT blabla
FROM Table t
INNER JOIN article_avis_favorable v ON t. id_article = v. id_article

Or

SELECT blabla
FROM Table 
WHERE id_article in (SELECT id_article FROM article_avis_favorable);

Upvotes: 1

Related Questions