How to use Variables in Snowflake

How to use Variables in Snowflake

Kahan Data Solutions

3 года назад

10,895 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@hectors8344
@hectors8344 - 06.05.2023 23:02

Have you ever run into problems declaring variables. When I run a simple declare sSQL varchar(500) , I get syntax error at position..unexpected <EOF>. I am trying to dynamically create a sql statement but I run in to string size limitation when I use your described technique. All attempts to declare the variable and assign datatypes are failing.

Ответить
@Dabunni6398
@Dabunni6398 - 10.03.2023 19:33

Love the lofi? music in the background :)

Ответить
@joshi1q2w3e
@joshi1q2w3e - 11.01.2023 08:31

Please make a video on Snowflake stored procedures please!

Ответить
@martinpalkovic7222
@martinpalkovic7222 - 02.12.2022 22:13

Nice video! Thanks 😃

Ответить
@gordonash6031
@gordonash6031 - 11.01.2022 20:43

Hi, this video is great, could you tell me how to set a variable from a select statement like in MS SQL like
declare @i int
select @i=max(id) from [dbo].[tbl]
select @i
Thanks

Ответить
@robertb8280
@robertb8280 - 06.12.2021 22:58

Thank you for the video. I am trying to set column names as I use to in oracle, using variables, but I cannot get it to work. For example, SET NAME1 = IMPORTANT_NAME Select Some_Name as $NAME1 from table1. Snowflake does not like this or using identifier($NAME1) etc. Any thoughts on this. I have a ton of column names that change every month that I wanted to preset as variables so that I don't have to keep changing the code.

Thanks

Ответить
@ukaszstangel9115
@ukaszstangel9115 - 20.07.2021 18:27

Nice one. Thank you!

Ответить