cancel
Showing results for 
Search instead for 
Did you mean: 

Creating views

Former Member
0 Kudos

I have to create a lot of views with a lot of tables.

When I join a view to a table, I seem to have to enter all the columns manually.

Is there a way to automatically select every column from the table so I can then remove the few I don't need ?

Thanks

Mike

Accepted Solutions (1)

Accepted Solutions (1)

c_baker
Employee
Employee
0 Kudos

Define a reference/view reference between the objects and double-check the join columns for the reference, then use shift+select to select the objects (connected Tables and/or Views) and 'Tools->Create View'.

This should add all columns from the selected objects into the view.

Once the view is created, open it up its properties and at the bottom of the 'SQL Query' tab there is a button that can show the query properties.  Select that button and the query properties open.  From there you can edit the SQL directly or on the other tabs, edit the column lists and aliases, expressions, and the join clauses, etc.

Chris

Former Member
0 Kudos

Thanks - That works.

Would be nice if it did the join query as well - but I can live with that.

c_baker
Employee
Employee
0 Kudos

Yes.  Even just based on the reference columns providing a 'where' clause.

Would be nice as someone uninitiated to the DBMS might run 'as is' and get a cartesian product.  Very nasty in some engines.

Perhaps worth an enhancement request.

Chris

Answers (1)

Answers (1)

GeorgeMcGeachie
Active Contributor
0 Kudos

Select the tables you want to include in the View, then go to the Tools menu and select 'Create View' (this is from memory, so the words might differ a tad)