Return the same row more than once

  • Hi everyone!

    I'm working on an application that prints labels of customers to be used in normal mail envelopes. The user chooses how many labels of customer's data will be printed.

    I'm using a WHILE loop to select the same row the number of times I need it and insert it in a table variable.

    Is there a better way to do this? I think there could be a better way, but don't know it!

    Thanks in advance!

    Hernan

     

  • Create a table that contains just numbers - 0, 1, 2, 3, ..., 1000 say.

    Then do a CROSS JOIN to this table from your label data source, where newtable.num < number of copies required.


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply