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 8665957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:36:48+00:00 2026-06-12T17:36:48+00:00

i have a query im doing to display records to oracle reports. the parameter

  • 0

i have a query im doing to display records to oracle reports. the parameter i need as selection is the class_code but when user click on the dropdown value it’s a bit messy for them(hard to explain here) so they ask to combine the study_intake and class_code as a word which would be clear to them.

now what i did is use AS for alias of a new column which combines the two, but i cant call it back (since it’s not the right syntax)

here’s a sample of my query:

SELECT DISTINCT STUDENT_ATTENDENTS.IC_PASSPORT, 
STUDENT_ATTENDENTS.NAME,
 STUDENT_ATTENDENTS.A_DATE, 
STUDENT_ATTENDENTS.A_TYPE, 
STUDENT_ATTENDENTS.ATTEN, 
TUTORIAL_CLASSES_MASTER.LECTURER_NAME, 
STUDENT_ATTENDENTS.COURSE_CODE, 
STUDENT_ATTENDENTS.SUBJECT_CODE, 
SUBJECT_MASTER_TABLE.CREDIT_POINT,
TUTORIAL_CLASSES_MASTER.STUDY_INTAKE || ' ' || STUDENT_ATTENDENTS.CLASS_CODE AS Study_Intake_Class_Code


FROM STUDENT_ATTENDENTS, TUTORIAL_CLASSES_MASTER, SUBJECT_MASTER_TABLE

WHERE Study_Intake_Class_Code = :CLASS_DODE
AND STUDENT_ATTENDENTS.SUBJECT_CODE = SUBJECT_MASTER_TABLE.SUBJECT_CODE
AND (STUDENT_ATTENDENTS.CLASS_CODE = TUTORIAL_CLASSES_MASTER.CLASS_CODE)

the line WHERE Study_Intake_Class_Code = :CLASS_DODE will return an error which is

ORA-00904: “STUDY_INTAKE_CLASS_CODE”: invalid identifier

i cant use back the alias. an idea i came up with is to create a view but this made the report haywire and affecting all the formulas(i didnt create the original report)

how do i adjust this query to make it work? any ideas or other style of query?

  • 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-12T17:36:50+00:00Added an answer on June 12, 2026 at 5:36 pm

    Just put the original query part into there where instead of the alias name… i.e.,

    WHERE TUTORIAL_CLASSES_MASTER.STUDY_INTAKE || ' ' || STUDENT_ATTENDENTS.CLASS_CODE = :CLASS_DODE
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im a budding iphone developer, and doing my best but i have a query
I have a query that I'm trying to figure the django way of doing
I have the field: APP_DATE (smalldatetime) I'm doing this query: INSERT INTO table (TYPE,
I'm doing this query: SomeObject.objects.annotate(something=Avg('something')).order_by(something).all() I normally have an aggregate field in my model
I have query to show the table like this: but I want to PIVOT
I am not sure how to go about doing this, but I have an
I have a query which retrieves Some data. I want to display that data
I have an Android activity that, onCreate(), will query a database and display the
I have a very simple SQL query that I made which retrieves some user
I have query with two MtM relations: $em = $this->getEntityManager(); $qb = $em->createQueryBuilder(); $qb

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.