You can build a sentence off a row using SELECT. For example,
SELECT [Who] + ' is going to do ' + [Item] + 'on '+ CONVERT(VARCHAR, [due], 105) + '.'
FROM [Actions]
Step 2: Format the sentence.
When you want to putting line break or even a tab in your output, you may need CHAR function in SQL.
Tab | char(9) |
Line feed | char(10) |
Carriage return | char(13) |
Details see http://msdn.microsoft.com/en-us/library/ms187323.aspx
Step 3: Form an essay with multiple records.
You may need to use CURSOR to iterate the rows from the result table.
No comments:
Post a Comment