Click here to Skip to main content
15,914,070 members
Home / Discussions / Database
   

Database

 
GeneralRe: select statement to display name 1000 times Pin
arun_pk1-Dec-09 0:22
arun_pk1-Dec-09 0:22 
GeneralRe: select statement to display name 1000 times Pin
Ashfield1-Dec-09 0:25
Ashfield1-Dec-09 0:25 
GeneralRe: select statement to display name 1000 times Pin
Shameel1-Dec-09 7:05
professionalShameel1-Dec-09 7:05 
GeneralRe: select statement to display name 1000 times Pin
Mycroft Holmes1-Dec-09 17:04
professionalMycroft Holmes1-Dec-09 17:04 
GeneralRe: select statement to display name 1000 times Pin
Ashfield1-Dec-09 21:37
Ashfield1-Dec-09 21:37 
GeneralRe: select statement to display name 1000 times Pin
Mycroft Holmes1-Dec-09 21:55
professionalMycroft Holmes1-Dec-09 21:55 
QuestionHow to Group By all columns but have Rollup only on few columns Pin
guydebell30-Nov-09 23:10
guydebell30-Nov-09 23:10 
AnswerRe: How to Group By all columns but have Rollup only on few columns [modified] Pin
Niladri_Biswas30-Nov-09 23:33
Niladri_Biswas30-Nov-09 23:33 
GeneralRe: How to Group By all columns but have Rollup only on few columns Pin
guydebell1-Dec-09 1:05
guydebell1-Dec-09 1:05 
QuestionHow to connect/disconnect users in sql server. Pin
Ashish Kumar Vyas30-Nov-09 20:13
Ashish Kumar Vyas30-Nov-09 20:13 
AnswerRe: How to connect/disconnect users in sql server. Pin
Ashfield30-Nov-09 20:57
Ashfield30-Nov-09 20:57 
Questioninserting multiple rows Pin
arun_pk30-Nov-09 18:07
arun_pk30-Nov-09 18:07 
AnswerRe: inserting multiple rows Pin
_Damian S_30-Nov-09 18:18
professional_Damian S_30-Nov-09 18:18 
GeneralRe: inserting multiple rows Pin
arun_pk30-Nov-09 18:21
arun_pk30-Nov-09 18:21 
GeneralRe: inserting multiple rows Pin
dan!sh 30-Nov-09 18:32
professional dan!sh 30-Nov-09 18:32 
GeneralRe: inserting multiple rows Pin
arun_pk30-Nov-09 18:36
arun_pk30-Nov-09 18:36 
GeneralRe: inserting multiple rows Pin
_Damian S_30-Nov-09 18:37
professional_Damian S_30-Nov-09 18:37 
GeneralRe: inserting multiple rows Pin
_Damian S_30-Nov-09 18:37
professional_Damian S_30-Nov-09 18:37 
GeneralRe: inserting multiple rows Pin
dan!sh 30-Nov-09 18:57
professional dan!sh 30-Nov-09 18:57 
GeneralRe: inserting multiple rows Pin
_Damian S_30-Nov-09 18:36
professional_Damian S_30-Nov-09 18:36 
The easiest way is to use another table to create a cartesian product (ie: selecting from two or more tables with nothing linking them causes a cartesian product - one row for every possible combination).

The following select statement will return over a million rows on my test SQL Server:

select 'a' 
from dbo.sysobjects as so1, dbo.sysobjects as so2


Extending this into an insert statement, you would do this:

insert into TABLENAME(FIELD1, FIELD2)
select 'a', 'b'
from dbo.sysobjects as so1, dbo.sysobjects as so2


which will basically insert the values a and b into your table a million or so times... If you have a table that autonumbers, then you will have a million consecutive numbers generated with which to test with.

Hope this helps.


GeneralRe: inserting multiple rows Pin
arun_pk30-Nov-09 18:52
arun_pk30-Nov-09 18:52 
GeneralRe: inserting multiple rows Pin
_Damian S_30-Nov-09 18:54
professional_Damian S_30-Nov-09 18:54 
GeneralRe: inserting multiple rows Pin
dan!sh 30-Nov-09 19:02
professional dan!sh 30-Nov-09 19:02 
AnswerRe: inserting multiple rows Pin
Niladri_Biswas30-Nov-09 20:06
Niladri_Biswas30-Nov-09 20:06 
GeneralRe: inserting multiple rows Pin
arun_pk30-Nov-09 20:51
arun_pk30-Nov-09 20:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.