16 May
2011
16 May
'11
4:58 p.m.
Hi all, I am looking to replace a string, before sending the query off to sql... right now, it is %{SQL-User-Name} (sql_user_name = "%{User-Name}" ), but the value is going to be like: mppp%sstaples@domain.com and i want to remove the mppp% (which will always be prefixed, or not exist) so that the variable only is sstaples@domain.com Is that easy to do? I have searched the docs, but came up empty (sorry if it has been discussed already... just didnt find it) I could always write it in the query to replace the string: SELECT REPLACE('mppps%sstaples@domain.com', 'mppp%', ''); but not sure if that is the most efficient way to do it? Thanks in advance. Steve.