daveriya (10/21/2011)
so it gives orderid values with no spaces on left or right ?or it just says orderid should be blank.plz confirm me
Try experimenting with the sample code which Todd set up for you - you're far more likely to remember the lesson if you get involved.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden