SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Entering random data into a table

By Junior Galvão - MVP,

This block of code is intended to demonstrate how we can in Microsoft SQL Server from version 2008. Use any user database to perform a execution of this code block and table storage RandomDataTable.
You can use this block of code to test and study environments, with the purpose of generating and populate a table with random data.
These random data are produced using the 130 characters declared in the @Texto variable, during command execution While.
The variable @Posicao is used to control and position the use of characters declared in the @Texto variable.
The @RowCount variable has the function to control the number of rows stored during execution with comado While.
After the amount of random rows being inserted the Select command should display the mass of data created and inserted into the RandomDataTabela table.

Total article views: 229 | Views in the last 30 days: 229
 
Related Articles
FORUM

blocking

blocking

FORUM

Using Variables in EXECUTE statement

Using Variables in EXECUTE statement

FORUM

random records

select random records

FORUM

Blocking

Blocking & Blocked by

FORUM

Execute Process Task: Failed to lock Variable

Execute Process Task: Failed to lock Variable

Tags
datas    
insert    
population table    
random    
tables    
 
Contribute