Permission denied for relation, Can't view newly created table in Webmin

Posted on 2005-04-08
Last Modified: 2011-08-18
I received some SQL commands to execute in order to create tables for a report that my Director is wanting.  I executed the commands in Webmin on the server and I cannot see the tables it created.  When I go to the report and set location in Crystal Reports, I can see the tables there and set the location. When I run the report I receive the error " ODBC error: ERROR: permission denied for relation (table name)".  The tables are owned by public. The same thing happens in Access.  I have tried changing my ODBC connection settings.  It seems like it might need to change some "granted privileges" but I can't see the tables to do so.  Any help would be appreciated. - Ken
Question by:kenalexander321

    Author Comment

    I have discovered that the SQL statements that were executed just created a new view on an existing table.  Here is an example of one of the statements:

    create view cw_hd_service_request_view as
    select cast('Received' as varchar(30)) as status, hti_key, hti_created_date from cw_hd
    union all
    select cast('Completed' as varchar(30)) , hti_key, hti_created_date from cw_hd where hti_status = 'Completed'
    union all
    select cast('Still Open' as varchar(30)), hti_key, hti_created_date from cw_hd where hti_status not in ('Completed')

    but I'm am still lost as far as a solution. - Ken
    LVL 22

    Accepted Solution

    execute SQL command

    grant select on cw_service_request_view to public;

    Author Comment

    Thank you very much. It solved the problem and the report works great. My weekend will be much better now. - Ken

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Best database to use for Maps is PostgreSQL. This is an open source database. Comes as a package with most Linux OS. For more info visit the following site: ( This requires some add-o…
    Many developers have database experience, but are new to PostgreSQL. It has some truly inspiring capabilities. I have several years' experience with Microsoft's SQL Server. When I began working with MySQL, I wanted a quick-reference to MySQL (htt…
    Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now