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

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -