sql - TSQL Trim - Portable Method -


i have string in following format 'domain\username'.

i wish trim domain , backslash string. cannont use right() have multiple domains of varying length.

what portable way this?

thank you.

select right('domain\username', len('domain\username') - charindex('\', 'domain\username'))


Comments

Popular posts from this blog

c++ - Compiling static TagLib 1.6.3 libraries for Windows -

xslt - Umbraco and EXSLT sets do not work -

php - How can I merge Nodes & Webform Submissions into instances of one general Content Type in Drupal 6? -