Jump to content
Sign in to follow this  
rain13

Need help with intermediate views

Recommended Posts

Hi!

I try to use HSQL database manager to create 2 views.

I want to create intermediate view first and then use the intermediate view in new view. Like create view a as .... . And then create view b as select x, ... from a.

If I write those 2 statements in HSQL database manager and hit 'Execute' query then it tells me user lacks privilege or object not found. However if I enter first create view statement, click "Execute SQL" and then write 2nd SQL statement ans click "Execute SQL" then it works.


The same happens when I migrate date from .sql files. If I put these 2 create view statements in separate .sql files it works but if I put them in same .sql file the 2nd one fails because first view is not created yet (the same error I showed before) However I have these statements separated with semicolon so it should not be issue.

Any ideas what it is? And how I could make it so that I could have only one .sql file that has both statements instead of having 2 separate files? 

Share this post


Link to post
Share on other sites

You'll need to check the documentation for that software to see what it supports.  That almost sounds like it's running everything in some strange type of transaction where the previous statements don't have any effect until everything finishes.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×