That doesn't sound like a normalized table structure...
An normalized table would look more like this:
CREATE TABLE meaningfulName
(RowId INT IDENTITY(1,1),
MyReader varchar(50),
MyReaderPos INT ,
CONSTRAINT CX_meaningfulName PRIMARY KEY CLUSTERED (RowId)
)
Edit: As you can see, the "loop" for every [k] isn't required at all. The values of [k] will be stored in the column MyReaderPos instead...
Lutz
A pessimist is an optimist with experience. How to get fast answers to your question[/url]
How to post performance related questions[/url]
Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]