Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8560579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:18:27+00:00 2026-06-11T16:18:27+00:00

Below is a query generated by the PetaPoco ORM for .NET. I don’t have

  • 0

Below is a query generated by the PetaPoco ORM for .NET. I don’t have an Oracle client right now to debug it and I can’t see anything obviously wrong (but I’m a SQL Server guy). Can anyone tell me why it is producing this error:

Oracle.DataAccess.Client.OracleException ORA-00923: FROM keyword not found where expected

SELECT * 
FROM (SELECT ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) peta_rn, 
"ON_CUST_MAS"."CU_NO", 
"ON_CUST_MAS"."CU_NAME", 
"ON_CUST_MAS"."CU_TYPE", 
"ON_CUST_MAS"."CONTACT", 
"ON_CUST_MAS"."ADD1_SH", 
"ON_CUST_MAS"."ADD2_SH", 
"ON_CUST_MAS"."CITY_SH", 
"ON_CUST_MAS"."POST_CODE", 
"ON_CUST_MAS"."PROV_SH", 
"ON_CUST_MAS"."COUNTRY", 
"ON_CUST_MAS"."PHONE_NU", 
"ON_CUST_MAS"."FAX_NU", 
"ON_CUST_MAS"."EMAIL", 
"ON_CUST_MAS"."PU_ORDER_FL", 
"ON_CUST_MAS"."CREDIT_AMOUNT" 
FROM "ON_CUST_MAS" ) peta_paged 
WHERE peta_rn>0 AND peta_rn<=20

Edit: Just in case it helps, this is a paging query. Regular queries (select all, select by ID) are working fine.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T16:18:28+00:00Added an answer on June 11, 2026 at 4:18 pm

    The problem is that the SELECT NULL in the ORDER BY clause of your analytic function is syntactically incorrect.

    over (ORDER BY (SELECT NULL))
    

    could be rewritten

    (ORDER BY (SELECT NULL from dual))
    

    or more simply

    (ORDER BY null)
    

    Of course, it doesn’t really make sense to get a row_number if you aren’t ordering the results by anything. There is no reason to expect that the set of rows that are returned would be consistent– you could get any set of 20 rows arbitrarily. And if you go to the second page of results, there is no reason to expect that the second page of results would be completely different than the first page or that any particular result would appear on any page if you page through the entire result set.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have such query (generated by Hibernate - edited for more clarity - below
I have the below query in a postgresql database SELECT * FROM accounts where
I'm using below query to count the daily result, but now I'm make it
I have below query I am trying to show message 'No SubSource for this
Can anyone help or provide me with some suggestions for the below query. I
I have been profiling the SQL query NHibernate generates for the following snippets below.
I have below code. if query is executed without exception then true should return,
I have the sql query below. I want to take the results and insert
I generated a drop down menu with the code below. How can I set
I have a long list generated from a simple mysql select query. Currently (shown

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.