Reputation: 57
Is there a way to create multiple views in one query in Snowflake?
I keep getting error when I try this -
create or replace view forecast_view as
select * from forecast
where variable = 'Name'
go
create or replace view demand_view as
select * from demand
where variable = 'Name'
Error:
SQL compilation error: syntax error line 5 at position 0 unexpected 'go'.
I also tried this -
create or replace view forecast_view as
select * from forecast
where variable = 'Name';
create or replace view demand_view as
select * from demand
where variable = 'Name';
but it only executes the first create view statement.
Upvotes: 1
Views: 1614
Reputation: 1585
There is no "go" command in SnowFlake:
Executing Multiple SQL Statements in a Stored Procedure
Upvotes: 1