oracle11g - How can i add extra columns to my select statement using with clause -
how can add v_sp_cdra_weekly_update.indication column following sql statement. of displaying str_out column. appreciated.
transformation(str_in,flag,str_out) (select substr(s,instr(s,'href=') + 5),1,cast(substr(s,1,instr(s,'href=') + 4) varchar2(4000)) (select key_documents s v_sp_cdra_weekly_update key_documents '%%https:%%') union select substr(str_in,2), case when flag = 1 , substr(str_in,1,1) != '>' 1 when substr(str_in,1,1) = '>' 0 when substr(str_in,1,5) = 'href=' 1 else 0 end, str_out || case when substr(str_in,1,1) = ' ' , flag = 1 '%20' else substr(str_in,1,1) end transformation length(str_in) > 0 ) select str_out transformation str_in null;
i don't know data, try ask question:
with transformation(str_in, flag, str_out, indication) (select substr(s,instr(s,'href=') + 5), 1, cast(substr(s,1,instr(s,'href=') + 4) varchar2(4000)), (select key_documents s, indication v_sp_cdra_weekly_update key_documents '%%https:%%') union select substr(str_in,2), case when flag = 1 , substr(str_in,1,1) != '>' 1 when substr(str_in,1,1) = '>' 0 when substr(str_in,1,5) = 'href=' 1 else 0 end, str_out || case when substr(str_in,1,1) = ' ' , flag = 1 '%20' else substr(str_in,1,1) end, null transformation length(str_in) > 0) select str_out, indication transformation str_in null;
Comments
Post a Comment