How does one do a substring in SQL 2008 Management Studio. I have a query that where I'd like to create a substring that takes an individuals organizational number and creates an absolute value to that I can determine Division, Department and Center for that individual.
We've tried this with no luck:
,substr(spon.ORG_NUMBER, 1, 3)||'00' as [Sponsoring Mngr Ctr]
,substr(e.sl_deptname_abbrv, 1, 2)||'000' as Submitter_Div