Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Repeat selected records

Author  Topic 

Teachme
Starting Member

45 Posts

Posted - 2006-10-18 : 12:20:57
Is there a way to repeat selected records in a query more than once.
for instance if i have a query such as this select col1 from tbl1..and it returns one record of value lets say 10 but i want it to repeat 10 times. In other words i get 10 records of value 10. thanks

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-10-18 : 12:23:38
Why?
If col1 returns 1000000000 you want to repeat as many times?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

Teachme
Starting Member

45 Posts

Posted - 2006-10-18 : 12:26:34
no not as many times..i just have a scenario where i wana repeat some records like 13 times..same values..
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2006-10-18 : 13:21:50
Cross join to a numbers table where n < 13

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2006-10-18 : 14:39:10
zomg, the PERFECT time to chime in with "DO IT IN THE FRONT END"



[Signature]For fast help, follow this link:
http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspx
Learn SQL
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-10-21 : 08:30:46
quote:
Originally posted by DonAtWork

zomg, the PERFECT time to chime in with "DO IT IN THE FRONT END"



[Signature]For fast help, follow this link:
http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspx
Learn SQL
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp




Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -