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

Posted by Astra on 10/01/42 11:33

Hi Thomas

I think your header thing might just work. Thanks for this

As for the text field, the reason I'm concat-ing the fields is because the
text field currently expects 2 fields and these appear to line up fine. I
just thought by concating the 2nd field with the params and then padding
these out to make nice columns would do it, but my columns go all over the
place.

Am I doing the padding incorrectly?

Rgds Rob


"Thomas R. Hummel" <tom_hummel@hotmail.com> wrote in message
news:1133546402.708566.238850@f14g2000cwb.googlegroups.com...
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

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