How do I rename a view in Base?

I’ve created a simple view of my database and don’t like the name I picked. How do I rename the view? The “rename” option under edit is grayed out when I select the view. It is not grayed out if, for instance, I select the table itself. I can find instructions on the web about how to rename a table using an SQL command (ALTER TABLE name RENAME TO newname) but that doesn’t work on the view, even though the view is treated as it were a table in other respects.

Hello,

Don’t know of any way to rename a View. Must create a new one with correct name.

Creating the new one is easy. Right click the original name & ‘Edit in SQL View’. Copy & place into new one.

Thanks! I thought of something like that, but didn’t know about Edit in SQLView. It would be a bit messy if the view were complicated, but since mine wasn’t it was easy. I’m tempted to submit the ability to rename a view as a bug or enhancement, but don’t think I’ll bother.

Don’t think a request would help. Other DB’s also work this way. Base is NOT the database.

If this answers your question please tick the :heavy_check_mark: (upper left area of answer). It helps others to know there was an accepted answer.

I’m not sure what you are saying. If you are using Base to access a database created by something else, without copying, you would be limited by the features of that implementation. But if you are working with a database created by Base, contained in a Base file, I can see no reason why you shouldn’t be able to rename a view. LibreOffice seems to pride itself in adding features that the systems it is mimicking don’t have, so I almost take your response as a challenge to submit a bug request!

You would be wasting your time & others. Base is only a front end to databases. The View is contained in and controlled by the the actual database. If the database doesn’t allow something (in this case renaming the View) there is nothing Base can to. It can’t change the functionality of the database itself.

You do not have a clear concept of the creation. Base is NOT creating the DB. It is only sending a command to the DB for it to be created.

HSQLDB v1.8 embedded is NOT part of Base. It is a separate entity. It ships with LO as a convenience so one doesn’t have to go through the effort to get their own. This DB is not an LO creation. Unfortunately it is a very old version and is intended (someday) to be replaced by FireBird embedded.

Just one other note on View. While renaming is not allowed in v1.8 (default with Base), you can do this in v2.x:

ALTER Table "View1" RENAME TO "MyView"