[Solved] View table SQL

Creating tables and queries
Post Reply
Nocton
Volunteer
Posts: 533
Joined: Fri Nov 05, 2010 10:27 am
Location: UK

[Solved] View table SQL

Post by Nocton »

If I have a View table created from a Query, is there any way to see the SQL that created it or the query that it is/was associated with? Somehow the SQL must be 'known' to the View table otherwise it would not update correctly when data in related tables is changed.

Regards

Nocton
Last edited by Nocton on Sat Mar 05, 2016 2:17 pm, edited 1 time in total.
OpenOffice 4.1.12 on Windows 10
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: View table SQL

Post by Villeroy »

Yes. But Base has no tool to make it visible. You can find the view definition in the database/script file of your Base archive.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Nocton
Volunteer
Posts: 533
Joined: Fri Nov 05, 2010 10:27 am
Location: UK

Re: [Solved] View table SQL

Post by Nocton »

Many thanks, Villeroy, I've found it.
OpenOffice 4.1.12 on Windows 10
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Solved] View table SQL

Post by Villeroy »

Sorry, I forgot that you can query this stuff from internal system tables:

Code: Select all

SELECT * FROM "INFORMATION_SCHEMA"."SYSTEM_VIEWS"
(HSQL 1.8)
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Nocton
Volunteer
Posts: 533
Joined: Fri Nov 05, 2010 10:27 am
Location: UK

Re: [Solved] View table SQL

Post by Nocton »

Even better, thank you.
OpenOffice 4.1.12 on Windows 10
Post Reply