![]() SELECT * - FROM - ORDER BY RowNo, PartNo SELECT DISTINCT t2. Place your cursor in the Find what text box and press the space bar twice to add two spaces. Ensure you are in the Replace tab in the Find and Replace dialog box. SELECT RowNo, PartNo, RTRIM(LTRIM(MyWord)) AS MyWord Delete Extra Spaces Using Word’s Find and Replace Tool. ( Pro Tip: Press Ctrl + A to select the entire document.) Figure 3. Show/Hide button Select the part of the text you want to change. ![]() Home tab (Optional) Select the Show/Hide button in the Paragraph group to reveal your document’s formatting. WHERE CHARINDEX( ' ', LTRIM(Remainder))=0 How to Adjust the Space between Words Select the Home tab in the ribbon. UNION ALL SELECT RowNo, PartNo + 1 AS PartNo, LTRIM(Remainder) AS MyWord, NULL AS Remainder WHERE CHARINDEX( ' ', LTRIM(Remainder))>0 UNION ALL SELECT RowNo, PartNo + 1 AS PartNo, LEFT(LTRIM(Remainder), CHARINDEX( ' ', LTRIM(Remainder))-1) AS MyWord, RIGHT(LTRIM(Remainder), LEN(LTRIM(Remainder)) - CHARINDEX( ' ', LTRIM(Remainder))) AS Remainder ![]() SELECT ROW_NUMBER() OVER( ORDER BY MyText) AS RowNo, 1 AS PartNo, LEFT(LTRIM(MyText), CHARINDEX( ' ', LTRIM(MyText))-1) AS MyWord, RIGHT(LTRIM(MyText), LEN(LTRIM(MyText)) - CHARINDEX( ' ', LTRIM(MyText))) AS RemainderįROM WHERE CHARINDEX( ' ', LTRIM(MyText))>0 ( ' This is another very strange text.'),ĭECLARE TABLE(RowNo INT, PartNo INT, MyWord VARCHAR( 255)) ![]() Copy Code DECLARE TABLE(MyText VARCHAR( 500))
0 Comments
Leave a Reply. |