on 12-24-2010 5:21 AM
I received the following error when I gave the following statement in select:
case when {fn_year(FINANCE_PERIOD.FP_START)} @prompt('Enter Year','N',,mono,free)
then 1 else 0
end
Parse failed: Exception: DBD, [Microsoft][ODBC SQL Server Driver] Syntax Error or access violationState: 42000
I looked at differnt forums but could not fnd the error.
You need an = sign before the @Prompt
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sams Latin
then try this:
CASE
WHEN YEAR(FINANCE_PERIOD.FP_START) = @Prompt('Enter Year','N',here give class/object or LOV's,mono,free) THEN 1 ELSE 0
END
Note: In case of Date , you can make it blank (3rd parameter), which gives you calendar at runtime.
I suggest you try it in step by step like:
>> @Prompt('Enter Year','N',here give class/object or LOV's,mono,free)
Parse it, succeed. Then
>> YEAR(FINANCE_PERIOD.FP_START)
Parse it, then
for each case see LOV's.
>> at last, try above CASE WHEN
Hope it solves you.
I'm Back
Merry Christmas
User | Count |
---|---|
85 | |
10 | |
9 | |
9 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.