How do I capitalise the first character?

  • try this code out

    DECLARE @name VARCHAR(100)

    SET @name = 'firstname'

    SELECT upper(LEFT(@name,1)) + lower(RIGHT(@name,LEN(@name) -1))

    Though you have to be really careful with automaticaly just upper casing the first character of names, as this rule does not apply to a lot of common last names eg, McDonald and van Gough

    I have seen people want to do this and quite often you end up with worse data than you started with.

Viewing post 1 (of 2 total)

You must be logged in to reply to this topic. Login to reply