Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cognos 8.4 starts with syntax

Status
Not open for further replies.

CrystalLion

Programmer
Jan 3, 2007
113
US
what is wrong with this statement?

If([Database View].[A_HISTORY_VW].[DIM_ACCT_NAME]
STARTS WITH 'AL_HE_ARM')
then 'HELOANS'


Thanks
[morning]
 
If
[Database View].[A_HISTORY_VW].[DIM_ACCT_NAME]
like
'AL_HE_ARM%'
then
'HELOANS'
else null

Wrong use of ( and ) by the way..

Ties Blom

 
doesn't work. No matter what I try I get a parsing error. Your suggestion generates:

QE-DEF-0459 CCLException
QE-DEF-0260 Parsing error before or near position: 18of "if[database..etc.....
QE-DEF-0261 QFWP - Parsing text: if[Database View...etc...

I've been at this all day to no avail. Could it be a model issue I am not aware of. My role is report writer.

Thanks
 
Other suggestion:

CASE
WHEN
SUBSTRING([Database View].[A_HISTORY_VW].[DIM_ACCT_NAME],1,9)
= 'AL_HE_ARM'
THEN
'HELOANS'
ELSE (NULL)
END

possibly SUBSTR instead of SUBSTRING (check in Cognos)

Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top