I'm a SQL acolyte, spending most of my time in Powershell. So for the purposes of this, I shall express myself thusly. Basically, I have a column of FullName, that contains FirstName LastName
, and I want it restructured to LastName, Firstname
in a SELECT
query.
If I wasn't clear enough, in Powershell I would do this:
$string = "John Smith"
$split = $string.Split(' ')
$builder = "$($split[0]), $($split[1])"
How does one accomplish this in SQL?