Akhira
Akhira

Reputation: 243

Substring in Snowflake, string is the parameter value

SET Date = '050120';

select SUBSTR("+Parameters!Date.Value+", 5, 2) enter image description here

I am passing the Date parameter value. Why is it not picking the date value? It is showing the output as 'ra' which is shown in screen shot. I am expecting it to show 20.

Upvotes: 0

Views: 148

Answers (1)

Mike Gohl
Mike Gohl

Reputation: 737

This will return 10:

SET Date = '050120';

select SUBSTR($Date , 5, 2);

Upvotes: 1

Related Questions