Reputation: 11
I am using table A and B to create table C after some data manipulation. Table C is my temp table (only have read access to database). In a separate select statement, I am doing my final data prep and table C is being referenced multiple times in my final query.
My problem is the temp tables do not work with create view. And I need to create a view with my final query where I am using temp table C.
Can anyone suggest what can be the alternative to temp tables in this scenario?
Upvotes: 0
Views: 1796
Reputation: 1271141
You can use CTEs. In most databases, this would look like:
create view D as
with C as (
. . .
)
select . . .
from C . . .;
Upvotes: 1