Oracle Error QSM-01207: query rewrite not possible when query has a NOREWRITE hint

Oracle Error Message

QSM-01207: query rewrite not possible when query has a NOREWRITE hint

Reason for the Error

When query contains a NOREWRITE hint, no query rewrite will take place for that query block.

Solution

Remove the NOREWRITE hint from the query