|
Posted by Thomas R. Hummel on 10/01/02 11:33
To add a header row (if you mean what I think you mean) you can just do
a SELECT... UNION with your variable. Give it a StockID that will
appear before all of your other StockIDs. For example:
SELECT 0, 'Short Description Name...'
UNION
SELECT s.StockID, ISNULL(sd.ShortDescription, s.StockID) +
.... <rest of your query here>
I'm not sure why this is in a cursor or what you do outside of the
cursor, so I don't know if this will work for you in this case or not.
As far as lining up the output, does the text box used a fixed-width
font? Otherwise, padding with spaces will not help you. You might be
able to do something with tabs, but that might get somewhat
complicated.
-Tom.
Navigation:
[Reply to this message]
|