Please let me know how to use the below snowflake query in ssrs. I am getting an error message as :Multiple SQL statements in a single API call are not supported; use one API call per statement instead.
I think that is because there is a semicolon after initializing the variables and select statement, so I think it is considering as multiple sql statements. Can you please let me know how to embed below Snowflake query in ssrs?
set (EndofMonth, EndDate,Period) = (
(current_date()-1),
(CAST(1||SUBSTR(CAST( DATEADD(day, - 1, current_date()-1)
AS VARCHAR(25)),3,2)||SUBSTR(CAST(DATEADD(day, - 1, current_date()-1) AS VARCHAR(25)),6,2)||
SUBSTR(CAST( DATEADD(day, - 0, current_date()-1)AS VARCHAR(25)),9,2) as DECIMAL(10, 0))),
(dateadd(month,-1,last_day(current_date())))
) ;
SELECT *
FROM (
Select $Period as Period ,* from (
SELECT 'Main Local' AS Delineator, Name
FROM TableA as n (n.Date <= $EndDate) AND (n.Date > $EndDate OR
n.Date = 0)
)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…