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

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

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