You are here: Re: Inserting dummy lines and padding « MsSQL Server « IT news, forums, messages
Re: Inserting dummy lines and padding

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация