1) Is the list of NameA, NameB, NameC, etc. fixed, known ahead of time, and reasonably short? Or does the query have to automatically "discover" those values?

2) How does the ID column come into play?

Patrick

0

HelpdeskJBCAuthor Commented: 2013-05-16

thanks looks good
one more question if i would like to select only top 100 and order by date how to i change the result to order it one more time by the date?
If i choose top 100 and order by date desc then ive got the newest entry date on top, but i yould prefer to see the last of this top 100 dates on top of the table?
I've already done this on a small sql select with another select is it the same way here ore are there other options?
so do I need to make one more select from your whole code? --> nested select?