Link to home
Start Free TrialLog in
Avatar of mugsey
mugseyFlag for United Kingdom of Great Britain and Northern Ireland

asked on

t-sql while loop to create test data

I have database in sql server 2005

I have a populated table called customer ....

tblCustomer
id          int
name    varchar(255)
zip        varchar(255)


I want to add a field to the table above called dummyvalue and update the table so it is appended like

dummyvalue1
dummyvalue2
dummyvalue3

for each populated row.  How can I do this?

and so on





ASKER CERTIFIED SOLUTION
Avatar of RiteshShah
RiteshShah
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
for how many records?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dportas
dportas

In case it helps, there are data generation tools that will do this task for you in a very efficient and easily maintainable way. For example there is a data generator built into Visual Studio Database Edition and also available in the Red Gate SQL toolkit.