This content has been marked as final. Show 8 replies
Do you have select permissions on the base tables of the view for the user running the query against it?
if i executing this view like select * from "vwEmpMain"; then it's working.
else it's not working.
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";
In case you can create a view and retrive the data then it should not have any issue with the current user_.
If you are quering this view from other user then you need to grant a privileges to the other users.
Show error or your logic to posible solution.
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"1 person found this helpful
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.
Thank you sir
it working fine.