on 12-04-2014 8:41 AM
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)
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.