New answers tagged

1

As Nickolay explained in his answer, WITH is not allowed in a view definition in Teradata. You can work around the specific problem by using a derived table instead. You can either specify it twice, keeping the union of your query: create view derived_table (derived_column) as select (a||'-'||b) as derived_column from (select a,b,c from table_a ...


0

Your view will join all the tables involved in the view definition in order to create the required view. First, of course, you should check that your tables are properly indexed so that the joins are as efficient as possible when creating the view. However, joining 25 tables with 30 inner joins is a relatively expensive undertaking, resulting in your case ...


7

The view is called whatever is listed in the CREATE statement, which would look like this in the script. CREATE VIEW viewA AS The vw_tableB is an table alias https://technet.microsoft.com/en-us/library/ms187455.aspx The readability of a SELECT statement can be improved by giving a table an alias, also known as a correlation name or range variable. A ...


1

Readers should not block readers, so if no one writes to the table I don't think using UR instead of CS will make much of a a difference. There is a small overhead I guess for applying and releasing the share lock, but my guess is that it will be negligible. I guess only way to find out for sure is to try and see if it affects throughput. I was unaware ...



Top 50 recent answers are included