我想在下面的语句中删除/删除'#'(在oracle中)

时间:2014-02-28 14:14:43

标签: sql oracle

我想在下面的语句中删除/删除'#'。请提供SQL查询,

分别为

CHK_ID=2001,2002,2003chk_name

2001    CAR LEASE - LTO REGISTRATION (PLATES ENDING IN #): BOOKS ENTRIES IN SYSTEM FOR PAYMENT        AND REMITTANCE TO BPI
2002    "NUMBERED FORM (EXCLUDE ATM CARDS) - WORKING SUPPLY:
SURPRISE COUNT THE # WORKING SUPPLY NUMBERED FORMS (EXCLUDE ATM CARDS) # TO MATCH WITH THE INVENTORY RECORD AND THE NUMBER FORMS ARE IN SEQUENCE. SUCH SURPRISE CHECK SHOULD MAKE REFERENCE TO DUAL CONTROL RECORD ON RELEASE DATE AND SERIAL #"
2003     PERFORM RECORDS FILE CLEAN OUT # AT LEAST ANNUALLY. THIS CLEAN OUT ALLOWS THE DISPOSAL OF ALL # NON-ESSENTIAL RECORDS NO LONGER NEEDED OR VITAL RECORDS BEYOND THE APPROVED RETENTION PERIOD

1 个答案:

答案 0 :(得分:2)

您需要REPLACE function

Oracle / PLSQL REPLACE函数的语法是:

REPLACE( string1, string_to_replace, [ replacement_string ] )

因此,在您的情况下,REPLACE(field,'#','') field是您想要更改的字段。

Here is SQLFiddle