kirpal singh manral Posted March 10, 2020 Posted March 10, 2020 I would like to implement below mentioned case when join in tibco spotfire infromation designer. SELECT * from sys.indexes i JOIN sys.partitions p ON i.index_id = p.index_id JOIN sys.allocation_units a ON a.container_id = CASE WHEN a.type IN (1, 3) THEN p.hobt_id WHEN a.type IN (2) THEN p.partition_id END I am able to write a direct join but not sure how to write it using case statement. Thanks in advance.
Shuting Fu Posted March 10, 2020 Posted March 10, 2020 You will need to create two join elements (using freehand join). Join #1:%1=%2 where %1 is i.index_id and %2 isp.index_id Join #2:%1=(case when %2 IN (1, 3) then %3when %2 IN (2) then %4 end) where %1 isa.container_id; %2 isa.type; %3 isp.hobt_id and %4 isp.partition_id When creating the information link, use all the 3 tables (i, p and a) and the two joins.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now