Tags down


SQL ORACLE ORA-00923: FROM keyword not found where expected

By : Zoe Zhou
Date : October 17 2020, 06:10 AM
To fix this issue I know what this error means but I do not understand why I am getting it. I think I did the question right. Please help. Question, ERD and code below. I am using Oracle SQL Developer. in advance! , Several syntax errors, including:
HAVING clause before GROUP BY
code :
  SUM(t.shares) AS total_trade_volume
FROM stock_exchange se 
JOIN trade t ON se.stock_ex_id = t.stock_ex_id
JOIN stock_listing sl ON sl.stock_id = t.stock_id AND sl.stock_ex_id = t.stock_ex_id
GROUP BY se.stock_ex_id, se.name, sl.stock_symbol
HAVING SUM(t.shares) IN (
  SELECT MAX(total_shares)
  FROM (
    SELECT stock_ex_id, stock_id, SUM(shares) AS total_shares
    FROM trade
    WHERE stock_ex_id IS NOT NULL
    GROUP BY stock_ex_id, stock_id
ORDER BY se.name, sl.stock_symbol

Share : facebook icon twitter icon

[Oracle][ODBC][Ora]ORA-00923: FROM keyword not found where expected

By : user2678434
Date : March 29 2020, 07:55 AM
Hope this helps Try to play with ROWNUM as TOP is meaningless in oracle.
Rownum help

Oracle SQL Error: ORA-00923: From Keyword not found where expected

By : Aspi yanto
Date : March 29 2020, 07:55 AM
wish helps you When I use the following sql command for Oracle: , Could be related to the indentifier try using "code"
code :
 from tablename
 group by HYCORCODE

"ORA-00923: FROM keyword not found where expected" just on Oracle 10g not in 11g

By : Yvonne Nathania
Date : March 29 2020, 07:55 AM
I wish this help you I am using the dynamic SQL from: , You can try something like this.
code :
  || TO_CHAR(sysdate + (level-1)/24, 'yyyymmddHH24')
  || TO_CHAR(sysdate + (level)/24, 'yyyy-mm-dd HH24')
  || ':00:00'') ') OUTPUT
  CONNECT BY level <= 24

PARTITION TABLE_NAME_2016041907 VALUES LESS THAN (TIMESTAMP'2016-04-19 08:00:00') ,PARTITION TABLE_NAME_2016041908 VALUES LESS THAN (TIMESTAMP'2016-04-19 09:00:00') ,PARTITION TABLE_NAME_2016041909 VALUES LESS THAN (TIMESTAMP'2016-04-19 10:00:00') ,PARTITION TABLE_NAME_2016041910 VALUES LESS THAN (TIMESTAMP'2016-04-19 11:00:00') ,PARTITION TABLE_NAME_2016041911 VALUES LESS THAN (TIMESTAMP'2016-04-19 12:00:00') ,PARTITION TABLE_NAME_2016041912 VALUES LESS THAN (TIMESTAMP'2016-04-19 13:00:00') ,PARTITION TABLE_NAME_2016041913 VALUES LESS THAN (TIMESTAMP'2016-04-19 14:00:00') ,PARTITION TABLE_NAME_2016041914 VALUES LESS THAN (TIMESTAMP'2016-04-19 15:00:00') ,PARTITION TABLE_NAME_2016041915 VALUES LESS THAN (TIMESTAMP'2016-04-19 16:00:00') ,PARTITION TABLE_NAME_2016041916 VALUES LESS THAN (TIMESTAMP'2016-04-19 17:00:00') ,PARTITION TABLE_NAME_2016041917 VALUES LESS THAN (TIMESTAMP'2016-04-19 18:00:00') ,PARTITION TABLE_NAME_2016041918 VALUES LESS THAN (TIMESTAMP'2016-04-19 19:00:00') ,PARTITION TABLE_NAME_2016041919 VALUES LESS THAN (TIMESTAMP'2016-04-19 20:00:00') ,PARTITION TABLE_NAME_2016041920 VALUES LESS THAN (TIMESTAMP'2016-04-19 21:00:00') ,PARTITION TABLE_NAME_2016041921 VALUES LESS THAN (TIMESTAMP'2016-04-19 22:00:00') ,PARTITION TABLE_NAME_2016041922 VALUES LESS THAN (TIMESTAMP'2016-04-19 23:00:00') ,PARTITION TABLE_NAME_2016041923 VALUES LESS THAN (TIMESTAMP'2016-04-20 00:00:00') ,PARTITION TABLE_NAME_2016042000 VALUES LESS THAN (TIMESTAMP'2016-04-20 01:00:00') ,PARTITION TABLE_NAME_2016042001 VALUES LESS THAN (TIMESTAMP'2016-04-20 02:00:00') ,PARTITION TABLE_NAME_2016042002 VALUES LESS THAN (TIMESTAMP'2016-04-20 03:00:00') ,PARTITION TABLE_NAME_2016042003 VALUES LESS THAN (TIMESTAMP'2016-04-20 04:00:00') ,PARTITION TABLE_NAME_2016042004 VALUES LESS THAN (TIMESTAMP'2016-04-20 05:00:00') ,PARTITION TABLE_NAME_2016042005 VALUES LESS THAN (TIMESTAMP'2016-04-20 06:00:00') ,PARTITION TABLE_NAME_2016042006 VALUES LESS THAN (TIMESTAMP'2016-04-20 07:00:00') -----------------------------------------------------------------------------

Query runs fine in SQL Server fails in oracle get ORA-00923 FROM keyword not found where expected

By : Beshoy Victor
Date : March 29 2020, 07:55 AM
With these it helps RESOURCE is a keyword in oracle. I don't think you can define it as an alias in your select statement.

Oracle Error: ORA-00923: FROM keyword not found where expected

By : xeadxb
Date : March 29 2020, 07:55 AM
I hope this helps . I wrote a trigger on my Oracle db but it showed me this error: , The actual error is with the preceding sql statement: Instead of
Related Posts Related Posts :
  • SQL string driving me crazy
  • summarize dates from a list of dates
  • Last 10 weeks in SQL Server
  • How to store less than / greater than in database
  • find number that is not 0 in a varchar sequence like 0000000001 or 00000123131
  • SQL query to fill multiple needs with partial quantities by using Oracle SQL window functions
  • SQL Server line break for CSV
  • I need to select clients who have multiple records in one column
  • How to group database column?
  • Getting a specific output from 2 tables
  • How to query different tables for data in order
  • About subquery in T-SQL
  • Memory Buffer pool taken by a Table
  • SQL : ORA-00906: missing left parenthesis
  • Data Conversion error while inserting into a new table from a joint statement
  • How to do sql pivot with multiple values in single column
  • Multiple rows into columns with column values group by columns in SQL Server
  • Data of previous quarters based on sysdate
  • Rearrange Date filter in stored procedure
  • ORA-00942: table or view does not exist .or We are not able to drop
  • SQL Where date1 is 3 days bigger than date2
  • #1235 - This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery' in MySQL
  • Can I SELECT *, COUNT(*) in the same query?
  • PLS-00642: local collection types not allowed in SQL statements. i am using oracle datadase 12c
  • How can I convert an integer representing EPOCH time to a timestamp in Athena (Presto)?
  • Find the One Random Set_id from each unique Skill_id
  • implement a manual increment with just simple SQL
  • SYSDATETIMEOFFSET() to turn off the offset
  • If I query from V$SQL view, does it include SQL that are still running and not yet finished?
  • Is there a way to join results from two queries in Python using sqlalchemy engine?
  • What is the query to choose the number of people living at each address?
  • Filter By date with format 'dd/mm'
  • Listagg in query having aliases
  • SQL stored procedure error about int while there is no int
  • Selecting columns from string
  • Select * parent records that have their children meet some criteria
  • Identity specification
  • Excel: Execute SQL Procedure with VBA -- allow user to continue working -- do not hang the Excel Application
  • sql - single line per distinct values in a given column
  • Select from a select result using lag
  • Window analytic function where window frame and order are different fields?
  • How can i output table data (multiple rows) as a multiple rows of concatenated strings
  • SQL Replace Function Replacing Too Many Parts Of A String
  • How do I have a composite field set in JOOQ
  • Using cases on PS Query
  • Data Truncation issue while importing excel from Azure Blob storage to Sql Server
  • How add aggregate function value in where clause?
  • ROW_NUMBER() OVER is slow with ORDER BY on single column
  • Shifting data from one column to another
  • Prevent XML empty tag parsing to zero
  • How to convert a datetime into date without changing the data type in SQL Server?
  • How to run a query from SQL in RJDBC Oracle Database?
  • Manually Checking of Value Changes in Tables for SQL
  • How can one count total records AND separately count records where two fields are equal
  • Trying to remove a bit.ly URL at the end of a SQL string
  • Variable values stored outside of SSIS
  • How to stop the insertion of default date format 1900-01-01 in SQL Server when user input is null
  • Extraxt date from ISO Week (201905) BigQuery
  • Common table expressions (CTEs) with large tables
  • Boolean type - oracle
  • shadow
    Privacy Policy - Terms - Contact Us © 35dp-dentalpractice.co.uk