cancel
Showing results for 
Search instead for 
Did you mean: 

Optional Prompt on universe

former_member419024
Participant
0 Kudos

  Scenario: Client wanted to have one copy of WEBI report inorder to schedule and refresh on demand. After playing around with the @Prompt, found out error when getting current year out of current date. It said SQL query error. When changing from getdate() to year(getdate()) the error occur. Is there any alternative way in doing optional prompt? My requirement is current year and current month as default value.

A.BATCACTYR = (Case When @Prompt('Enter This Year','C','Year Others',mono,constrained,,{'999'})='999' Then getdate() else @Prompt('Enter This Year','C','Year Others',mono,constrained,,{'999'}) END)

Accepted Solutions (0)

Answers (1)

Answers (1)

nscheaffer
Active Contributor
0 Kudos

Is your database SQL Server?  You could try DATEPART(YEAR, GETDATE()) instead of YEAR(GETDATE()).  I don't know if that will make a difference, but it is worth a try.

Noel