oracle11g - What is CHR code for single quote ' in oracle? -



oracle11g - What is CHR code for single quote ' in oracle? -

what chr code single quote (') in oracle? generating update statements atm tables without pks, , regex replacing special characters.

select 'update question set questiontypeid = '||questiontypeid||', questiontext = '''||questiontext||''', questiondescription = '''||questiondescription||''', productid = '||productid||', mandatory = '||case when mandatory null 'null' else to_char(mandatory) end ||', displayorder = '||displayorder||', minvalue = '||case when minvalue null 'null' else to_char(minvalue) end||', maxvalue = '||case when maxvalue null 'null' else to_char(maxvalue) end||', parentid = '||case when parentid null 'null' else to_char(parentid) end||', questioncategoryid = '||questioncategoryid||', isasset = '||case when isasset null 'null' else to_char(isasset) end||', isthunderheadonly = '||case when isthunderheadonly null 'null' else to_char(isthunderheadonly) end||', qcode = '''||qcode||''' questionid = '||questionid ( (select * question questionid not in (select t.questionid question t total bring together question@somecomp.co.uk d on t.questionid = d.questionid t.questiontypeid <> d.questiontypeid or t.questiontext <> d.questiontext or t.questiondescription <> d.questiondescription or t.productid <> d.productid or t.mandatory <> d.mandatory or t.displayorder <> d.displayorder or t.minvalue <> d.minvalue or t.maxvalue <> d.maxvalue or t.parentid <> d.parentid or t.questioncategoryid <> d.questioncategoryid or t.isasset <> d.isasset)) )

let's see ascii value :

sql> select ascii('''') dual; ascii('''') ----------- 39

or, avoid multiple single-quotation marks, using literal quote technique :

sql> select ascii(q'[']') dual; ascii(q'[']') ------------- 39

let's confirm :

sql> select chr(39) dual; c - ' sql>

oracle oracle11g

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -