Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Resolve column ambiguity in Infomaker

Posted on 2010-09-15
4
Medium Priority
?
1,110 Views
Last Modified: 2013-12-19
After trying to join two tables I'm getting an ambiguity error. As far as I can see, I've used the table name with the column name throughout the query. Is there some way to identify the offending statement?
0
Comment
Question by:clcarlson
  • 2
4 Comments
 
LVL 2

Expert Comment

by:j_coreil
ID: 33686835
Post the SQL and we might can find it. That error typically means that you are referencing a column in the select statement that could come from two or more tables in the from statement.

Select a.First_Name,
           b.First_Name
From   employees a, spouses b
Where a.spouse_id = b.spouse_id;

If you alias the tables make sure you use the alias throughout the query as well.
0
 

Author Comment

by:clcarlson
ID: 33686894
Following is the query. I'm VERY new at this and, unfortunately, don't yet understand a lot of the syntax. I've tried to find a resource on point, but haven't had a lot of luck. Any suggestions would be appreciated. Thanks.

SELECT "GL_TRANSACTION_VIEW"."GLPOSTINGDATE",  
         "GL_TRANSACTION_VIEW"."TIMESTAMP",  
         "GL_TRANSACTION_VIEW"."AFTERCLOSEFLAG",  
         "GL_TRANSACTION_VIEW"."AMOUNT",  
         "GL_TRANSACTION_VIEW"."SOURCENAME",  
         "GL_TRANSACTION_VIEW"."GLACCOUNTID",  
         "GL_TRANSACTION_VIEW"."GLACCOUNTNAME",  
         "GL_TRANSACTION_VIEW"."USERNAME",  
         "GL_PACK".DebitAmt(amount) as "DR",  
         "GL_PACK".CreditAmt(amount) as "CR",  
         DP.Get('Report Date') as ReportDate,  
         DP.Get('ReportTitle') as asTitle,  
         DP.Get('CompanyName') as asCompanyName,  
         Gl_Pack.GetRefNameNoDescr(GL_Transaction_View.GLTrxHdrIdx, GL_Transaction_View.GlTrxSeq) AS REF1 ,  
         "GL_TRANSACTION_VIEW"."SOURCEIDX",
         "CA_TRANSACTION_VIEW"."COSTCENTERNAME",
         "CA_TRANSACTION_VIEW"."PHASENAME"  
    FROM "GL_TRANSACTION_VIEW",
         "CA_TRANSACTION_VIEW"
   WHERE ("GL_TRANSACTION_VIEW"."ACRUCASHTYPE"="CA_TRANSACTION_VIEW"."ACRUCASHTYPE") AND
         ("GL_TRANSACTION_VIEW"."FISCALYEAR"="CA_TRANSACTION_VIEW"."FISCALYEAR") AND
         ("GL_TRANSACTION_VIEW"."FISCALPERIOD"="CA_TRANSACTION_VIEW"."FISCALPERIOD") AND
         ("GL_TRANSACTION_VIEW"."GLPOSTINGDATE"="CA_TRANSACTION_VIEW"."GLPOSTINGDATE") AND
         ("GL_TRANSACTION_VIEW"."USERNAME"="CA_TRANSACTION_VIEW"."USERNAME") AND
         ("GL_TRANSACTION_VIEW"."TIMESTAMP"="CA_TRANSACTION_VIEW"."TIMESTAMP") AND
         ("GL_TRANSACTION_VIEW"."INITIALINSTALLATIONFLAG"="CA_TRANSACTION_VIEW"."INITIALINSTALLATIONFLAG") AND
         ("GL_TRANSACTION_VIEW"."AFTERCLOSEFLAG"="CA_TRANSACTION_VIEW"."AFTERCLOSEFLAG") AND
         ("GL_TRANSACTION_VIEW"."AMOUNT"="CA_TRANSACTION_VIEW"."AMOUNT") AND
         ("GL_TRANSACTION_VIEW"."SOURCEIDX"="CA_TRANSACTION_VIEW"."SOURCEIDX") AND
         ("GL_TRANSACTION_VIEW"."SOURCENAME"="CA_TRANSACTION_VIEW"."SOURCENAME") AND
         ("GL_TRANSACTION_VIEW"."SOURCEID"="CA_TRANSACTION_VIEW"."SOURCEID") AND
         ("GL_TRANSACTION_VIEW"."GLTRXHDRIDX"="CA_TRANSACTION_VIEW"."GLTRXHDRIDX") AND
         ("GL_TRANSACTION_VIEW"."GLTRXSEQ"="CA_TRANSACTION_VIEW"."GLTRXSEQ")
ORDER BY "GL_TRANSACTION_VIEW"."GLACCOUNTID" ASC,
                  "GL_TRANSACTION_VIEW"."GLACCOUNTNAME" ASC,
                  "GL_TRANSACTION_VIEW"."GLPOSTINGDATE" ASC,
                  "GL_TRANSACTION_VIEW"."TIMESTAMP" ASC
0
 
LVL 21

Accepted Solution

by:
flow01 earned 2000 total points
ID: 33686961
the amount in
          "GL_PACK".DebitAmt(amount) as "DR",  
         "GL_PACK".CreditAmt(amount) as "CR",  
is not qualified
    change to  
         "GL_PACK".DebitAmt( GL_TRANSACTION_VIEW.amount) as "DR",  
         "GL_PACK".CreditAmt(GL_TRANSACTION_VIEW.amount) as "CR",  
0
 

Author Closing Comment

by:clcarlson
ID: 33687004
AWESOME! You're hired. Thanks very much.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question