getting the first letter of each word

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jess Rubio
    New Member
    • Jan 2012
    • 1

    #1

    getting the first letter of each word

    I am having problem regarding on how would i create a store procedure that can return only the first letter of each word on a data.

    ex. Community Service
    the return data must be CS.
    how would i create a simple sql statement for this query.
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    There is no simple statement for it. You would have to loop through the entire string looking for spaces and getting the first letter you come across after a space. You would then append it to a result string and return that. Also, you would use a function, not a stored procedure.

    Comment

    Working...