/ Published in: SQL
Expand |
Embed | Plain Text
/* Strip(remove) special character(s) from a string. Parameters -1-: String to process -2-: Special character to strip Note: If second parameter is null then the following list is used: <tab>, <single quote>, <double quote>, <\>, <|>, <`>, <~>, <^> */ FUNCTION strip_spc_character ( in_string IN varchar2, in_chars IN varchar2 DEFAULT NULL ) RETURN varchar2 IS tab char( 1 ) := chr(9); double_quote char( 1 ) := chr(34); single_quote char( 1 ) := chr(39); mask varchar2( 80 ) := '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; v_special_chars varchar2( 80 ) := '`~^\|'||double_quote||single_quote||tab; begin IF in_chars IS NOT NULL then v_special_chars := in_chars; end IF; RETURN translate( in_string, mask || v_special_chars, mask ); exception when others then RETURN in_string; end strip_spc_character;
Comments
Subscribe to comments
You need to login to post a comment.

What SQL is this programmed in, can this be done in Trasact-SQL
What SQL is this programmed in, can this be done in Trasact-SQL
I'm not sure how to create a window (that is not a window) if you know what I mean. I think this is a very handy way to display street view. So I would like to have a link that opens one of those box things (forgive the technical terms), and display the street view of the coordinates it's given.