Posted by: perfectionist August 13, 2009
I just need a Query!! For SQL janne Maanche!! VERY IMP
Login in to Rate this Post:     0       ?        
define the table map for all selected parameters as well

in ur case,

SQL> select First_Name, Last_Name, Address, a.User_Name, Status, University
from User_Info a, Admission_Code b, Univ_Code c, User_Admission_Status
d where a.User_Name=d.User_Name and b.Code=d.Admission_Code and
c.Code=d.Univ_Code;
select First_Name, Last_Name, Address,
User_Name, Status, University from User_Info a, Admission_Code b,
Univ_Code c, User_Admission_Status d where a.User_Name=d.User_Name and
b.Code=d.Admission_Code and c.Code=d.Univ_Code

the error u got is becoz of there are columns in ur table that are present in both mapped tables

i dint go thru all columns but i think User_Admission_Status and User_Info have same named column, User_Name, thus the error.

best wud b to use tablename.columnName format

like

SELECT
table1.column1, table2.column1, table2.column3
FROM
tblFirst table1,
tblSecond table2

even better would be using Joins instead of commas.

i hope it helps
Read Full Discussion Thread for this article