The Chr () function converts ASCII code to character: character – ASCII;
The ASCII () function converts a character to an ASCII code: ASCII code-"character;
In Oracle, the CHR () function and ASCII () are a pair of inverse functions.
Chr () Function Example:
Sql> select CHR from dual;
CHR (65)
-------
A
Accii () Function Example:
Sql> Select ASCII (' A ') from dual;
ASCII (' A ')
----------
65
In doing the data migration, we used Chr (39) to denote single quotes
----other information in the migration convenience terminal The table administratorcontract is identical to the Biz_admin_contract table.--044_ Convenience Terminal Other information migration Biz_admin_contractSelect '----Convenience terminal other information migration'||To_char (Sysdate,'YYYY-MM-DD HH24:mi:ss') fromdual;Select 'INSERT INTO Biz_admin_contract (Contract_no, NAME, ORGANIZATION, Bankbook_ NO, Withdraw_limit_single, Transfer_limit_single, Tran_minimum_amt, Daily_withdraw_times, DAILY_ Withdraw_amt, Daily_transfer_times, Daily_transfer_amt, Deposit_limit, Use_default_param, STA TUS, Cdmamount, Depamount, Lastjkdate, Stradmpersonnum, Lastjktime) VALUES (' ||Chr ( the)||Contract_no||Chr the)||','||Chr ( the)||NAME||Chr the)||','||Chr ( the)||ORGANIZATION||Chr the)||','||Chr ( the)||Bankbook_no||Chr the)||','||Withdraw_limit_single||','||Transfer_limit_single||','||Tran_minimum_amt||','||Daily_withdraw_times||','||Daily_withdraw_amt||','||Daily_transfer_times||','||Daily_transfer_amt||','||Deposit_limit||','||Use_default_param||','||Chr ( the)||STATUS||Chr the)||','||Cdmamount||','||Depamount||','||Chr ( the)||Lastjkdate||Chr the)||','||Chr ( the)||Stradmpersonnum||Chr the)||','||Chr ( the)||Lastjktime||Chr the)|| ');' fromXtcur. Administratorcontract T--where T.contract_no in (' & ')/* Migrate by Contract number */--and T.name in (' & ')/* by Customer name/--and t.organization in (' & ')/* by Contracting agency */--and T.bankbook_no in (' & ')/* account */;
The CHR of Oracle functions