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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:39:40+00:00 2026-06-04T20:39:40+00:00

I making a report in EM and I need to figure out somthing here

  • 0

I making a report in EM and I need to figure out somthing here

I have this query that I made:

SELECT
*
FROM
(
    SELECT DISTINCT
    patch.host as "PHost",
    patch.home_location as "PDirectory",
    patch.home_name as "PHome",
    MAX(patch.INSTALLATION_TIME) as "Patched (Date)",
    MAX(patch.PATCH_RELEASE) as "PVersion",
    listagg(patch,',') WITHIN GROUP (ORDER BY patch) "Patches"
    FROM
    mgmt$applied_patches patch
    GROUP BY patch.host, patch.home_location,patch.home_name
    ORDER BY patch.host, patch.home_location
) "PCH",
(
    SELECT DISTINCT 
    T1.PROPERTY_VALUE as "MHost",
    T2.PROPERTY_VALUE as "MDirectory",
    T3.PROPERTY_VALUE as "MVersion",
    count(T4.PROPERTY_VALUE) as "Count of SID",
    listagg(T4.PROPERTY_VALUE,',') WITHIN GROUP (ORDER BY T4.PROPERTY_VALUE) as "SID"
    FROM
    MGMT$TARGET_PROPERTIES T1,
    MGMT$TARGET_PROPERTIES T2,
    MGMT$TARGET_PROPERTIES T3,
    MGMT$TARGET_PROPERTIES T4
    WHERE
    T1.TARGET_GUID = T2.TARGET_GUID
    and T1.TARGET_GUID = T3.TARGET_GUID
    and T1.TARGET_GUID = T4.TARGET_GUID
    and T1.PROPERTY_NAME = 'MachineName'
    and T2.PROPERTY_NAME = 'OracleHome'
    and T3.PROPERTY_NAME = 'Version'
    and T4.PROPERTY_NAME = 'SID'
    GROUP BY T1.PROPERTY_VALUE, T2.PROPERTY_VALUE, T3.PROPERTY_VALUE
) "MGM"
WHERE
PDirectory = MDirectory

I’m getting error ORA-00904: “MDIRECTORY”:….

I tried many combinations! (PCH.PDirectory = MGM.MDirectory, ……) nothing works

cheers

  • 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-04T20:39:42+00:00Added an answer on June 4, 2026 at 8:39 pm

    Well…

    This doesn’t work:

    SELECT * FROM
    (SELECT DUMMY AS  "PDirectory" FROM DUAL) "PCH",
    (SELECT DUMMY AS  "MDirectory" FROM DUAL) "MGR"
    WHERE PDIRECTORY = MDIRECTORY
    

    But this works:

    SELECT * FROM
    (SELECT DUMMY AS  "PDirectory" FROM DUAL) "PCH",
    (SELECT DUMMY AS  "MDirectory" FROM DUAL) "MGR"
    where "PCH"."PDirectory" = "MGR"."MDirectory"
    

    change your query accordingly.

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

Sidebar

Related Questions

Ok I'm making my first report from scratch so I'm fairly new to this.
I have a report I need to print from a Flex Project I have
I am making an rdl report and I have three check-boxes that if checked
I have people, companies, employees, events and event kinds. I'm making a report/followup sheet
In a LaTeX report I am making I have to write a regex. There
I'm having trouble with the way I designed this little report I'm making. Is
i have to build some financial data report, and for making the calculation, there
I'm currently making some system that will gather statistical reports from different sites, for
I need to have an optional parameter or a parameter that's default value is
I have a USB device that I need to be able to talk to

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.