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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:39:17+00:00 2026-06-12T08:39:17+00:00

Recently I copied an Oracle database from one machine to another. Original : Oracle

  • 0

Recently I copied an Oracle database from one machine to another.

  1. Original: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0
  2. Copy: Oracle Database 11g Express Edition Release 11.2.0.2.0 – Production
    For some reason the following query works on the original but not on the copy.

If a t.tdt_id is substituted in place of tdt_id in the group by the query works (as per td_tablespaces t )

Can someone explain why this is and if it has something to do with the installation. The data is the exact same in both.

SELECT
    tdt_name as "name", 
    tdt_contents as "Content",         
    tdt_status as "Status",         
    round(( subsize.SubSize_MB ), 2 ) as "size used",         
    round(( sum( MaxMB ) - subsize.SubSize_MB ), 2 ) as "size free" 
FROM    
    td_tablespaces t 
INNER JOIN        
    (
        SELECT 
            tdt_id,
            CASE 
                 WHEN upper( d.df_autoextend ) = 'YES' THEN  round(( sum( df_maxsize ) / 1024 ), 2 )  
                 WHEN upper( d.df_autoextend ) = 'NO' THEN round(( Sum( df_size ) / 1024 ), 2 )                 
            END as MaxMB
        FROM    
            td_datafiles d         
        GROUP BY 
            tdt_id,                 
            d.df_autoextend,                 
            df_maxsize,                 
            df_size         
    ) sub 
ON      
    t.tdt_id = sub.tdt_id 
INNER JOIN        
    (
        SELECT 
            tdt_id,                 
            sum( df_size / 1024 ) -( df_free / 1024 ) SubSize_MB,                 
        df_free      / 1024 SubSize_Free         
        FROM    
            td_datafiles df         
        GROUP BY 
            tdt_id,                 
            df_free         
    ) subsize 
ON 
    t.tdt_id = subsize.tdt_id 
WHERE 
    ins_id   = 2096 
GROUP BY 
    tdt_id,         
    tdt_name,         
    tdt_contents,        
    tdt_status,         
    subsize.SubSize_MB,         
    SubSize_Free 
ORDER BY tdt_contents  
  • 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-12T08:39:19+00:00Added an answer on June 12, 2026 at 8:39 am

    Oracle enforces strict rules when referencing columns in a query and will raise ORA-00918: column ambiguously defined if a column is found on two tables and referenced without a table prefix or an alias.

    Since tdt_id is defined both in t and subsize, you couldn’t call tdt_id without an alias or a table name in:

    • the SELECT clause
    • the WHERE clause
    • the ORDER BY clause

    For some reason in some versions of 10g the error is not raised when the column is in a GROUP BY clause. This is inconsistent with the rest of the syntax parsing, this could lead to ambiguous results and must have been classified as a bug. This has been corrected in 11g.

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

Sidebar

Related Questions

We've recently hit a snag where a trademark symbol is being copied from one
My team recently rebuilt their SQL Server 2005 development database from scratch using the
Recently I transferred a set of data from one server to hpcc(high-performance computing) Command
I recently deployed a .war from Netbeans IDE on my local machine to Amazon
Recently one of our app servers went down, when it was rebooted the Python
recently, while working on a db2 -> oracle migration project, we came across this
I recently installed Visual Studio 2010 and copied and converted an old VS2005 solution
We have recently moved from VS 2008 to VS 2010. With that my applications
In our C# code I recently changed a line from inside a linq-to-sql select
I have two copies of a site, one is the production copy, and the

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.