COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: locus on 01 Oct 2014 04:57:12 AM

Title: ** RESOLVED ** Case Statment: UDA-SQL-0358 Line 3: Syntax error near "=". Error
Post by: locus on 01 Oct 2014 04:57:12 AM
Hi Folks,

I see this issue mentioned elsewhere but always as a filter it seems.

When trying to add this statement as a query calculation in RS, if nothing in the report references it, it validates in isolation.

CASE WHEN([Data Item 1] IN (1,2)) THEN (CASE WHEN([Data Item2] <= [Data Item3])
THEN ([Data Item 1] = 1)
ELSE ([Data Item 1] = 2)
END)
ELSE ([Data Item 1]= 3)
END



When referenced in the report by other objects, this error

UDA-SQL-0358 Line 3: Syntax error near "=".

Syntax looks OK to me.
The same happens if I add as a query item in Framework manager and try to test it.

Any ideas? Database is Informix. Running BI 10.2.1

Locus
Title: Re: Case Statment: UDA-SQL-0358 Line 3: Syntax error near "=". Error
Post by: MFGF on 01 Oct 2014 05:04:43 AM
Quote from: locus on 01 Oct 2014 04:57:12 AM
Hi Folks,

I see this issue mentioned elsewhere but always as a filter it seems.

When trying to add this statement as a query calculation in RS, if nothing in the report references it, it validates in isolation.

CASE WHEN([Data Item 1] IN (1,2)) THEN (CASE WHEN([Data Item2] <= [Data Item3])
THEN ([Data Item 1] = 1)
ELSE ([Data Item 1] = 2)
END)
ELSE ([Data Item 1]= 3)
END



When referenced in the report by other objects, this error

UDA-SQL-0358 Line 3: Syntax error near "=".

Syntax looks OK to me.
The same happens if I add as a query item in Framework manager and try to test it.

Any ideas? Database is Informix. Running BI 10.2.1

Locus

Yup. It doesn't like your assignation (eg [Data Item 1] = 3)

Perhaps try:

CASE WHEN([Data Item 1] IN (1,2)) THEN (CASE WHEN([Data Item2] <= [Data Item3])
THEN (1)
ELSE (2)
END)
ELSE (3)
END
Title: Re: Case Statment: UDA-SQL-0358 Line 3: Syntax error near "=". Error
Post by: locus on 01 Oct 2014 05:52:29 AM

MF to the rescue.

Thanks! :)
Title: Re: ** RESOLVED ** Case Statment: UDA-SQL-0358 Line 3: Syntax error near "=". Error
Post by: Raghuvir on 01 Oct 2014 10:07:40 AM
Quote from: locus on 01 Oct 2014 05:52:29 AM
MF to the rescue.

Thanks! :)

Always  :)