This error can also occur if you add a calculated column to a SELECT * statement.įor example, if you tried to execute the following SQL statement: SELECT *, CAST((FROM_TZ(CAST(last_modified_date AS timestamp),'+00:00') at time zone 'US/Pacific') AS date) AS "Local Time" You could correct this SELECT statement by using double quotation marks around the alias: SELECT owner AS "owner column" This error can also occur if you use an alias, but do not include the alias in double quotation marks.įor example, if you tried to execute the following SQL statement: SELECT owner AS 'owner column' You could correct this SELECT statement by including the FROM keyword as follows: SELECT * This error can occur when executing a SELECT statement that is missing the FROM keyword.įor example, if you tried to execute the following SELECT statement: SELECT * Always check your consultant’s credentials and experience to ensure they meet your needs.The option(s) to resolve this Oracle error are: Option #1 If you continue to experience this error, you may consider contacting your database administrator or a licensed Oracle consultant. Make sure no Oracle reserved word was used as an alias.Make sure you have enclosed the alias in double quotation marks.Make sure it is not misspelled, misplaced, or missing. The FROM keyword should follow the last selected item. While correcting this error is not difficult, simply remember the following rules to avoid seeing this error. Resolve ORA-00923 by fixing this syntax mistake.Īvoiding ORA-00923 in the future is a matter of keeping to the proper syntax when executing SELECT or REVOKE statements. The alias-in this example, manager column-is not enclosed in double quotation marks. To correct the statement, insert the FROM keyword in the correct place, and run again:Īnother example of the ORA-00923 error is when quotation marks do not properly enclose the alias, as in the following: In the following example, the query is missing the keyword FROM: For practical application of these practices on how to resolve ORA-00923, see the following examples. See the Oracle appendix for reserved words to view a complete list. Lastly, make sure no reserved words were used as an alias. Secondly, if you used quotation marks in an alias, make sure that they have properly enclosed the alias and that they are double quotation marks. Make sure you have placed the keyword FROM in its correct place, and that no spelling errors have occurred. To resolve ORA-00923, the user should make sure three possible causes are corrected. If the FROM keyword is missing or otherwise incorrect, you will see ORA-00923. In Oracle, the keyword FROM must follow the last selected item in a SELECT statement or in the case of a REVOKE statement, the privileges. If you are seeing this error, the keyword FROM is spelled incorrectly, misplaced, or altogether missing. ORA-00923 occurs when you try to execute a SELECT or REVOKE statement without a FROM keyword in its correct form and place. ORA-00923 FROM keyword not found where expected When you are faced with this error, you will see the following message: Keep in mind ORA-00923 does not occur in Oracle 10g. ORA-00923 is a commonly seen error that is easily resolved by simply correcting its syntax.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |