sql - Converting the comma seperated string in oracle to the format for the in clause -
i trying achieve '2611','2616','3306' '2611,2616,3306'
select replace( '2611,2616,3306', ',', ''',''' ) dual;
the above giving me output of 2611','2616','3306. can tell how first , last comma
you concatenate them front , back:
select '''' || replace( '2611,2616,3306', ',', ''',''' ) || '''' dual;
which result '2611','2616','3306'.
Comments
Post a Comment