79525259

Date: 2025-03-21 11:07:37
Score: 1
Natty:
Report link

Please check this, cross apply is not supported in databricks sql

WITH fx_date_new AS ( SELECT CASE WHEN '2025-01-01' > current_date() THEN CAST(date_format(add_months(current_date(), -1), 'yyyyMM') AS INT) 
ELSE CAST(date_format(add_months('2025-01-01', -1), 'yyyyMM') AS INT) 
END AS fxdate ) 
SELECT * FROM fx_date_new 
JOIN (SELECT gold.calcccy(1000, 'USD', 'EUR', fx_date_new.fxdate) as calculatedfunctionvalue) as UDF  
Reasons:
  • Blacklisted phrase (1): Please check this
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: SQL006