This content has been marked as final. Show 8 replies
952646 wrote:Show exactly what you are executing and the exact error message you get.
Hope doing well,
sir i am having one view which i created in sql developer and it's showing in connections
but when i am running this view it's showing result table or view does not exist.
how to run this view ?
if you have created the view with mixed case using double quotes as stated in your post, you will have to execute the query on it using double quotes, also just clicking on the view in sql developer opens the view structure, not sure what issue you are facing.
select * from "vwEmpMain";
here is my view which i created
Create Or Replace Force View "AMPLEX_GRAND1"."vwEmpMain" As
SELECT Employee.Emp_ID ,
Employee.Emp_FirstName || ' ' || Employee.Emp_LastName Emp_Name ,
Comp_Master.Parent_ID HiredBy ,
Comp_Master.STATUS Comp_Status ,
RIGHT JOIN Employee
ON Comp_Master.Comp_ID = Employee.Comp_ID
LEFT JOIN Desig_Master
ON Employee.Desig_Code = Desig_Master.Desig_Code
LEFT JOIN Dept_Master
ON Employee.Dept_Code = Dept_Master.Dept_Code
LEFT JOIN Category_Master
ON Employee.Cat_Code = Category_Master.Cat_Code;
when i am executing like this : select * from vwEmpMain;
getting error table or view does not exist.
but when i am executing like this: select * from "vwEmpMain";
why this difference??
Because you created the view as "vwEmpMain"
By default, if you don't use quotes, Oracle will store away the name of the view (or table or whatever) in uppercase
and will automatically convert it to uppercase when you refer to it without quotes. Therefore it will find it again.
If you create it using quotes Oracle keeps the exact upper and lower case name you specified BUT you have to refer to it in
EXACTLY the same way when you refer to it.
My advice, do not use quotes when creating:
create view vwEmpMain
Then you can refer to it
select * from vwEmpMain
select * from VWEMPMAIN
select * from vwempmain
select * from VwEmPmAiN
it won't matter.