I have the table with 1 column and has following data
Status a1 i t a2 a3
I want to display the following result in my select query
Following syntax would work :
.... where x.p_NBR =to_number(substr(y.k_str,11,5)) and x.q_nbr = (case when instr(substr(y.m_str,11,9),'_') = 6 then to_number(substr(y.m_str,11,5)) when instr(substr(y.m_str,11,9),'_') = 0 then to_number(substr(y.m_str,11,9)) else 1 end )