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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:01:16+00:00 2026-05-27T07:01:16+00:00

I am trying to write an SQL query. If it works in Oracle SQL

  • 0

I am trying to write an SQL query. If it works in Oracle SQL Developer, I will use it in TableAdapters query. This is the query; DURUM doesn’t belong to any table but I will ad it as a field in the TableAdapter

Error is; ORA-00904: “DURUM”: invalid identifier

SELECT IPYYB_BELGE.BELGEID,
       IPYYB_MUELLIF.MUELLIFID,
       IPYYB_MUELLIF.AD,
       IPYYB_MUELLIF.SOYAD,
       IPYYB_MUELLIF.TCKIMLIKNO,
       IPYYB_BELGE.SERINO,
       IPYYB_PRM_BELGEGRUP.ACIKLAMA,
       IPYYB_BELGE.ALINMATARIHI,
       IPYYB_BELGE.SONGUNCELLEMETARIHI,
       IPYYB_PRM_MUELLIFUNVAN.ACIKLAMA AS UNVANACIKLAMA,
       DURUM,
       CASE
         WHEN IPYYB_BELGE.ALINMATARIHI >= 2012 THEN 'EDA'
         WHEN IPYYB_BELGE.ALINMATARIHI < 2012 THEN 'GECE'
       END AS DURUM
FROM IPYYB_MUELLIF,
     IPYYB_BELGE,
     IPYYB_PRM_BELGEGRUP,
     IPYYB_PRM_MUELLIFUNVAN
WHERE IPYYB_MUELLIF.MUELLIFID = IPYYB_BELGE.MUELLIFID
AND   IPYYB_BELGE.GRUPID = IPYYB_PRM_BELGEGRUP.KOD
AND   IPYYB_MUELLIF.UNVAN = IPYYB_PRM_MUELLIFUNVAN.KOD (+)

The solution is

SELECT IPYYB_BELGE.BELGEID,
   IPYYB_MUELLIF.MUELLIFID,
   IPYYB_MUELLIF.AD,
   IPYYB_MUELLIF.SOYAD,
   IPYYB_MUELLIF.TCKIMLIKNO,
   IPYYB_BELGE.SERINO,
   IPYYB_PRM_BELGEGRUP.ACIKLAMA,
   IPYYB_BELGE.ALINMATARIHI,
   IPYYB_BELGE.SONGUNCELLEMETARIHI,
   IPYYB_PRM_MUELLIFUNVAN.ACIKLAMA AS UNVANACIKLAMA,

   (CASE
     WHEN IPYYB_BELGE.ALINMATARIHI >= 2012 THEN 'EDA'
     WHEN IPYYB_BELGE.ALINMATARIHI < 2012 THEN 'GECE'
   END) DURUM
FROM IPYYB_MUELLIF,
     IPYYB_BELGE,
     IPYYB_PRM_BELGEGRUP,
     IPYYB_PRM_MUELLIFUNVAN
WHERE IPYYB_MUELLIF.MUELLIFID = IPYYB_BELGE.MUELLIFID
AND   IPYYB_BELGE.GRUPID = IPYYB_PRM_BELGEGRUP.KOD
AND   IPYYB_MUELLIF.UNVAN = IPYYB_PRM_MUELLIFUNVAN.KOD (+)
  • 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-05-27T07:01:16+00:00Added an answer on May 27, 2026 at 7:01 am

    Assuming "EDA" should be a character constant, you need to use single quotes, not double quotes.

    "EDA" is a column name, whereas 'EDA' is a character literal

    Edit

    DURUM apears before your case statement. You cannot reference a column alias like that

    Actually I think it’s not needed because the CASE statement will return a column named DURUM.

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

Sidebar

Related Questions

I'm trying to write a HQL/Criteria/Native SQL query that will return all Employees that
Im trying to write an SQL query that will check in the table ‘persons’
I'm trying to write an SQL query that would search within a CSV (or
I am trying to write an SQL query within Visual Studio TableAdapter Query Wizard
I am trying to write a query for SQL Server 2005 but I can't
I'm trying to write some SQL that will delete files of type '.7z' that
I'm trying to write a stored procedure in SQL that will : Make a
I am trying to write the following SQL query as a JPA query. The
I am trying to write my SQL Server 2008 query in such a way
I am trying to write a SQL query to fetch rows whose fields contain

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.