| Author |
Topic  |
|
|
vass
Starting Member
12 Posts |
Posted - 01/02/2007 : 00:39:39
|
Hi All,
I want solution for this problem . I have single record in my table but when i select , i want show record's n times WithOut DML operations.
 |
Edited by - vass on 01/02/2007 06:25:34
|
|
|
SwePeso
Patron Saint of Lost Yaks
Sweden
29156 Posts |
Posted - 01/02/2007 : 06:42:35
|
SELECT t.* FROM <YourTableNameHere> AS t CROSS JOIN (SELECT Number FROM master..spt_values WHERE Name IS NULL AND Number BETWEEN 1 AND <YourNtimesValueHere>) x
Peter Larsson Helsingborg, Sweden |
 |
|
|
madhivanan
Premature Yak Congratulator
India
22469 Posts |
Posted - 01/02/2007 : 06:44:55
|
1 Where do you want to show data? 2 What do you mean by i want show record's n times WithOut DML operations.?
Madhivanan
Failing to plan is Planning to fail |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
USA
7004 Posts |
Posted - 01/02/2007 : 08:36:33
|
quote: Originally posted by vass
Hi All,
I want solution for this problem . I have single record in my table but when i select , i want show record's n times WithOut DML operations.

Since a SELECT statement is a DML statement, how would it be possible?
CODO ERGO SUM |
 |
|
|
vass
Starting Member
12 Posts |
Posted - 01/03/2007 : 00:58:51
|
quote: Originally posted by Peso
SELECT t.* FROM <YourTableNameHere> AS t CROSS JOIN (SELECT Number FROM master..spt_values WHERE Name IS NULL AND Number BETWEEN 1 AND <YourNtimesValueHere>) x
Peter Larsson Helsingborg, Sweden
 Thanks peter larsson From Vass |
 |
|
|
madhivanan
Premature Yak Congratulator
India
22469 Posts |
Posted - 01/03/2007 : 07:57:52
|
But you didnt reply on the questions asked 
Madhivanan
Failing to plan is Planning to fail |
 |
|
|
vass
Starting Member
12 Posts |
Posted - 01/04/2007 : 01:14:17
|
quote: Originally posted by Peso
SELECT t.* FROM <YourTableNameHere> AS t CROSS JOIN (SELECT Number FROM master..spt_values WHERE Name IS NULL AND Number BETWEEN 1 AND <YourNtimesValueHere>) x
Peter Larsson Helsingborg, Sweden
is there any other way to get this result without using the systables because it affects not only performance and also the limited number only avalibale on the table. |
 |
|
|
vass
Starting Member
12 Posts |
Posted - 01/04/2007 : 01:29:16
|
quote: Originally posted by madhivanan
1 Where do you want to show data? 2 What do you mean by i want show record's n times WithOut DML operations.?
Madhivanan
Failing to plan is Planning to fail
Assume table has only one record when select the record from the table i want show that record as many as i want .
create table test (no int ,name varchar(20))
insert test select 1,'test'
i want show that reocrd five time's(dynamicaly) ... select no,name from test
|
 |
|
|
madhivanan
Premature Yak Congratulator
India
22469 Posts |
Posted - 01/04/2007 : 07:39:59
|
Can I know the reason why you want to replicate the rows? And where do you want to show the replicated data?
Madhivanan
Failing to plan is Planning to fail |
 |
|
|
vass
Starting Member
12 Posts |
Posted - 01/05/2007 : 07:01:06
|
quote: Originally posted by madhivanan
Can I know the reason why you want to replicate the rows? And where do you want to show the replicated data?
Madhivanan
Failing to plan is Planning to fail
i have an requirement that i want split single data based on the number user's enter the number in the front end ... |
Edited by - vass on 01/05/2007 07:02:36 |
 |
|
|
mr_mist
Grunnio
United Kingdom
1870 Posts |
Posted - 01/05/2007 : 07:05:24
|
This is post-processing, better suited to the application layer logic.
------- Moo. :) |
 |
|
|
madhivanan
Premature Yak Congratulator
India
22469 Posts |
Posted - 01/05/2007 : 07:41:18
|
Then Do it in the front end is the correct answer
If you use front ends like VB6, try something like
For i=1 to Trim(textbox.text)
Print Rs("column")
Next i
Madhivanan
Failing to plan is Planning to fail |
 |
|
| |
Topic  |
|