How to make a view pointing to dynamically created database

I would like to create a view upon a database which changes on time . For Example: initially, a view layer is to be created for the database B1_2016 in the next refresh, a new database is created and named as B2_2016. So the view layer is to be pointed to B2_2016. In this way, the view layer should point to the newest database created.How can this be achieved in Teradata

Answers


That simply isn't how SQL works.

View definitions are part of a schema, and as such themselves part of a database. They cannot ever depend on "variables" that make the view definition itself dependent upon "different databases at different times".

Allowing such stuff is a near guarantee to make the system they are part of worse than just brittle.


Need Your Help

Why it's hiding everything instead of concerned things when I click on a hyperlink?

javascript jquery html hyperlink show-hide

I'm displaying a list of questions alongwith their answers and correct answer. For this purpose I'm making use of HTML . Now there is one hyperlink present in each question titled "Hide-Show Answer...

How to arrange the items of gridview?

asp.net gridview

I have a settings page in my asp.net website,in which a user can select desired items and their order to be displayed in another page.I am displaying these items(which are obtained from database) i...