473,385 Members | 1,615 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Ambiguous Column Name Error

MERGE INTO stbl_pcop_dafmaster_av x
using
( select rsn,mdn,sdca,sdca,sdca,sdca,sdca,sdca,sdca,sdca,sd ca,sdca,sdca,sdca,sdca,sdca,sdca,sdca,sdca,sdca,sd ca,sdca,sdca,sdca,sdca,sdca
from stbl_phonegen_new where MDN in
(select a.mdnnumber from stbl_pcop_dafmaster_av a
where a.cafnumber in (select b.cafnumber from stbl_dafxml_export_summary b where repush_flag='1' and pg_status='1' and pg_msg ='MDN RSN Mismatch') )
)
y on (x.mdnnumber = y.mdn)
when matched then
update set x.rsnnumber = y.rsn
WHEN NOT MATCHED THEN
INSERT
VALUES ('0','0','0','0','0','0','0','0','0','0','0','0',' 0','0','0','0','0','0','0','0','0','0','0','0','0' ,'0')




WHILE EXECUTING THIS STATEMENT I M GETTING ERROR LIKE


The following error has occurred:

ORA-00918: column ambiguously defined

PLEASE HELP



I NEED TO UPDATE RSNNUMBER FIELD OF MY DAFMASTER TABLE FOR THOSE ROWS THAT HAVE MDNNUMBER SAME AS MDN OF PHONEGEN TABLE WITH THE CONDITIONS AS DEFINED ( I AM RUNNING IT USING TOAD TOOL)


PLEASE GUIDE ME ON THE SAME
Mar 27 '08 #1
7 2941
Stang02GT
1,208 Expert 1GB
please refer to this post i answered a question about ambiguous error i think it will help you.
Mar 27 '08 #2
still i m stuck into the same hole.
someone please pull me out,
Stang02GT your solution was of no help to me plz suggest an alternative
Apr 3 '08 #3
Stang02GT
1,208 Expert 1GB
still i m stuck into the same hole.
someone please pull me out,
Stang02GT your solution was of no help to me plz suggest an alternative
are you sure you don't have two column names that are the same?
Apr 3 '08 #4
are you sure you don't have two column names that are the same?

At last the problem is solved.
There was a problem with the sdca columns,i got them changed to sdca+1,sdca+2....and so on.
thanks for the support
Apr 4 '08 #5
Stang02GT
1,208 Expert 1GB
At last the problem is solved.
There was a problem with the sdca columns,i got them changed to sdca+1,sdca+2....and so on.
thanks for the support
So you did have to columns with the same name?
Apr 4 '08 #6
So you did have to columns with the same name?
It was a bit different, yes there were more than one column with same name in the same select statement ;however that wasnt a problem itself.actually when i was executing the select statement independently.it was giving me the output, but once i put that into merge statement,it posed problems,like the one i mentioned above.

i feel while comparing the rows from the two tables executor was in a fix to determine which column to compare to what column in other table but why?? i dont know..

i mean it could easily have chosen the columns in order of their declaration

if you could throw some light into the problem...?
Apr 10 '08 #7
Stang02GT
1,208 Expert 1GB
It was a bit different, yes there were more than one column with same name in the same select statement ;however that wasnt a problem itself.actually when i was executing the select statement independently.it was giving me the output, but once i put that into merge statement,it posed problems,like the one i mentioned above.

i feel while comparing the rows from the two tables executor was in a fix to determine which column to compare to what column in other table but why?? i dont know..

i mean it could easily have chosen the columns in order of their declaration

if you could throw some light into the problem...?
Yes but with SQL you have to be very specific. So in this case where you had the two columns that were of the same name, it doesn't know which one to take, and there is no default like you are talking about where it just takes the 1st one declared. SQL (like many other languages) needs precise step by step instructions.


Think of it like this. If there were two balls (exactly the same) laying on the floor and you told someone "get that ball and return it to me". How are they going to know which ball to get. But if you say get me the ball on the right or get my the ball on the left then the person knows exactly which ball you are talking about.
Apr 11 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: xuatla | last post by:
compile error: test1.cpp:21: error: ISO C++ says that `T mtd::CDiffOperator::getdp(const mtd::mVector&, long int, mtd::mBCTYPE) const' and `void mtd::CDiffOperator::getdp(mtd::mVector&, const...
3
by: Travel Jadoo | last post by:
I could not find any discussion on this but imho this seems an erroneous error occuring now in 7.3.4 (after upgrade from 7.2.3): select null::time, 'test'::varchar as time order by time; ERROR:...
2
by: Alex C. Barberi | last post by:
I'm using VB.NET 2005 and DX9 SDK (Apr 2006). I created an instance of the Direct3D.Font, and when I try to call DrawText it says: 'DrawText' is ambiguous because multiple kinds of members with...
9
by: Prasad | last post by:
HI, I am a beginner in VC++.. I am trying to write a Win32 console application in visual studio.. I am using following header files.. #include <STRING> using namespace std; #include...
6
by: Mike S | last post by:
Hi all, A (possibly dumb) question, but I've had no luck finding a definitive answer to it. Suppose I have two tables, Employees and Employers, which both have a column named "Id": Employees...
3
by: Arpan | last post by:
The following code exists in a class file named "Users.vb": Namespace Users Public Class UserDetails Public FirstName As String Public LastName As String Public UserName As String Public...
1
by: rn5a | last post by:
Consider the following code in a VB class file: Namespace LoginUserFetchDB Public Class ZForZebra : Inherits SoapHeader Public UserName As String Public Password As String End Class Public...
12
by: Nathan Sokalski | last post by:
I have several CustomControls that I have written for my project. However, when I try to compile I recieve the following warning & errors: Warning 32 Could not resolve this reference. Could not...
11
by: =?Utf-8?B?SmVycnkgQw==?= | last post by:
I have a machine Windows Server 2003 using IIS 6.0 and I am getting the error BC30560 prjob_ascx is ambiguous in the namespace ASP I found a fix. Deleting all the files in the...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.