select name from t_table_c c whereexists ( select1from t_table_a a innerjoin t_table_b b on a.system_id = b.system_id where a.system_id =123 and c.role_list like'%'|| b.role_id ||'%' )
create table t_table_a ( id int primary key, system_id int );
create table t_table_b ( id int primary key, system_id int, role_id int );
create table t_table_c ( id int primary key, name varchar2(20), role_list varchar2(200) );
insert into t_table_a values(1, 123); insert into t_table_a values(2, 234); insert into t_table_a values(3, 100);
insert into t_table_b values(1, 222, 667); insert into t_table_b values(2, 123, 555); insert into t_table_b values(3, 123, 777); insert into t_table_b values(4, 234, 567); insert into t_table_b values(5, 234, 231);
insert into t_table_c values(1, 'james', '667,777'); insert into t_table_c values(2, 'lucy', '223,555,823'); insert into t_table_c values(3, 'tom', '253,231'); insert into t_table_c values(4, 'max', '123,712'); insert into t_table_c values(5, 'min', '123,567'); insert into t_table_c values(6, 'kim', '1777,2211'); insert into t_table_c values(7, 'kenv', '220,1555,800');
select name from t_table_c c where exists ( select 1 from t_table_a a inner join t_table_b b on a.system_id = b.system_id where a.system_id = 123 and c.role_list like '%' || b.role_id || '%' );
select c.name, b.id from t_table_a a inner join t_table_b b on a.system_id = b.system_id inner join t_table_c c on c.role_list like '%' || b.role_id || '%' where a.system_id = 123;
select c.name, b.id from t_table_a a inner join t_table_b b on a.system_id = b.system_id inner join t_table_c c on c.role_list like concat('%', b.role_id, '%') where a.system_id = 123;
2017-09-25 09:56:34: ### Printing of configuration values complete ### 2017-09-25 09:56:34: HKLM/Software/Oracle/ocr/ is NOT configured
2017-09-25 09:56:34: HASH(0x4366ef8) registry key does not exist 2017-09-25 09:56:34: HASH(0x4366ef8) registry key does not exist 2017-09-25 09:56:34: Improper Oracle Clusterware configuration found on this host 2017-09-25 09:56:34: Deconfigure the existing cluster configuration before starting 2017-09-25 09:56:34: to configure a new Clusterware 2017-09-25 09:56:34: run 'E:\app\11.2.0\grid/crs/install/rootcrs.pl -deconfig' 2017-09-25 09:56:34: to deconfigure existing failed configuration and then rerun root.bat
var input = "20170504112153999"; var date = DateTime.ParseExact(input , new string[] { "yyyyMMddHHmmss", "yyyyMMddHHmmssf", "yyyyMMddHHmmssff", "yyyyMMddHHmmssfff" } , CultureInfo.CurrentCulture, DateTimeStyles.None);