select ''''+LEFT(displayname,charindex(' ', displayname))...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Bicycles Meta

Q&A about the site for people who build and repair bicycles, people who train cycling, or commute on bicycles

-- Enter Query Title
-- Enter Query Description
select 
  ''''+LEFT(displayname,charindex(' ', displayname))+'''' as FirstName,
  --SUBSTRING(displayname,charindex(' ', displayname),(LEN(displayname) - charindex(' ', displayname))) as LastName,
  age 
from 
  Users 
where 
  not Age is null and 
  age > 16 and 
  charindex(' ', displayname) > 1

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results