I wanted to know How can I combine the first letter of every word seperated by space in a column. I have got the query almost to work, For the second word it finds the result fine but for the third word it seems to go back to the first words first letter for ex:
SELECT BANK_NAME, SUBSTRING(BANK_NAME, 1, 1) + SUBSTRING(BANK_NAME, CHARINDEX(' ', BANK_NAME) + 1, 1) + SUBSTRING(BANK_NAME,
CHARINDEX(' ', BANK_NAME) + 1, 1) AS Expr1
Returns bob for
ABN Amro Bank It should display AAB but it displays AAA
Alpha Credit Bank It should display ACB but it displays ACA
I appreciate any one's help regarding the problem in advance.