Author |
Topic |
vass
Starting Member
12 Posts |
Posted - 2007-01-02 : 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. |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-01-02 : 06:42:35
|
SELECT t.* FROM <YourTableNameHere> AS tCROSS JOIN (SELECT Number FROM master..spt_values WHERE Name IS NULL AND Number BETWEEN 1 AND <YourNtimesValueHere>) xPeter LarssonHelsingborg, Sweden |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-01-02 : 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.?MadhivananFailing to plan is Planning to fail |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2007-01-02 : 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 - 2007-01-03 : 00:58:51
|
quote: Originally posted by Peso SELECT t.* FROM <YourTableNameHere> AS tCROSS JOIN (SELECT Number FROM master..spt_values WHERE Name IS NULL AND Number BETWEEN 1 AND <YourNtimesValueHere>) xPeter LarssonHelsingborg, Sweden
Thanks peter larsson From Vass |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-01-03 : 07:57:52
|
But you didnt reply on the questions asked MadhivananFailing to plan is Planning to fail |
|
|
vass
Starting Member
12 Posts |
Posted - 2007-01-04 : 01:14:17
|
quote: Originally posted by Peso SELECT t.* FROM <YourTableNameHere> AS tCROSS JOIN (SELECT Number FROM master..spt_values WHERE Name IS NULL AND Number BETWEEN 1 AND <YourNtimesValueHere>) xPeter LarssonHelsingborg, Sweden
is there any other way to get this result without using the systablesbecause it affects not only performance and also the limited number only avalibale on the table. |
|
|
vass
Starting Member
12 Posts |
Posted - 2007-01-04 : 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.?MadhivananFailing 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 testselect 1,'test'i want show that reocrd five time's(dynamicaly) ...select no,name from test |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-01-04 : 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?MadhivananFailing to plan is Planning to fail |
|
|
vass
Starting Member
12 Posts |
Posted - 2007-01-05 : 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?MadhivananFailing 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 ... |
|
|
mr_mist
Grunnio
1870 Posts |
Posted - 2007-01-05 : 07:05:24
|
This is post-processing, better suited to the application layer logic.-------Moo. :) |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-01-05 : 07:41:18
|
Then Do it in the front end is the correct answerIf you use front ends like VB6, try something likeFor i=1 to Trim(textbox.text) Print Rs("column")Next i MadhivananFailing to plan is Planning to fail |
|
|
|