cancel
Showing results for 
Search instead for 
Did you mean: 

metric syntax help two tables..

Former Member
0 Kudos

Apologies as it has been a long week..

I have a metric that is to be sourced from two tables and can;t seem to get it to parse...

Case

WHEN Tbl1.dim = 'A'

THEN sum(tbl2.cnt)

where tbl1.obja = tbl2.obja

ELSE 0

END

Tried case and decode... ugh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You CASE statement is missing a THEN operator.

You wrote:

Case
WHEN Tbl1.dim = 'A'
THEN sum(tbl2.cnt)
where tbl1.obja = tbl2.obja
ELSE 0
END

The right syntax will look like:

Case
WHEN Tbl1.dim = 'A' THEN sum(tbl2.cnt)
where tbl1.obja = tbl2.obja THEN ...write your expression...
ELSE 0
END

Regards

Didier

Former Member
0 Kudos

Ugh....

Thanks so much Didier!

I'm going to ease up on my caffeine intake!

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Michael, what is the error message? Is there any join between these 2 tables?

-


If you are using the BusinessObjects tool, you should join [ASUG|www.asug.com]