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

  • SEARCH
  • Home
  • 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 8854827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:58:25+00:00 2026-06-14T13:58:25+00:00

I am building a complex query. First here is my query select LOSA_APP.app_ref_no AS

  • 0

I am building a complex query. First here is my query

select LOSA_APP.app_ref_no AS "App.Ref.No." 
from losa_app LOSA_APP, 
     losa_app_z LOSA_APP_Z
where 
    LOSA_APP.app_status='A' 
and 
    trunc(sysdate) between (nvl(LOSA_APP_Z.li_dt, LOSA_APP_Z.li_collect_dt)) AND ((trunc(sysdate))) 
and
    (trunc(sysdate) - nvl(losa_app_z.li_dt,losa_app_z.li_collect_dt)) > 90  
and
    (select losa_app_z.app_ref_no 
     from losa_app_z 
     where (trunc(sysdate) - nvl(losa_app_z.li_dt, losa_app_z.li_collect_dt)) > 90
    )

The problem is if i run the last query separately or i omit the last query then it is run fine, like if i only run

 (select losa_app_z.app_ref_no 
  from losa_app_z 
  where (trunc(sysdate) - nvl(losa_app_z.li_dt, losa_app_z.li_collect_dt)) > 90)

but if i run the whole query then i get the error

ORA-00936: missing expression
00936. 00000 -  "missing expression"
*Cause:    
*Action:
Error at Line: 7 Column: 128

Line 7 is the line at which my last query and
(select losa_app_z.app_ref_no from losa_app_z....
is present. What i am doing wrong ? Please help.

Thanks

  • 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-14T13:58:27+00:00Added an answer on June 14, 2026 at 1:58 pm

    You should compare result of this query

     and
     (select losa_app_z.app_ref_no 
      from losa_app_z 
      where (trunc(sysdate) - nvl(losa_app_z.li_dt, losa_app_z.li_collect_dt)) > 90
     ) = something_here
    

    to something.

    For future always try to manage your brackets properly. Count them if necessary.

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

Sidebar

Related Questions

I am building my first complex app (in RoR) and as I think about
I am building an iOS App which displays video streams from a somewhat complex
I am building an app with complex data which I use arrays for. Some
I'm currently building an Excel 2003 app that requires a horribly complex form and
I've a complex ActiveRecord query that I'm building up with different scopes, depending on
I'm building a complex web app and to keep things simple, I made various
I'm building a Q&A app on Rails with a lot of complex validations (e.g.
I'm building a complex SQL query and I want to test a result in
We are building a fairly complex application that we need to be able to
I am currently considering the best way of building a relatively complex page in

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.