Yuvatha Posted March 31, 2015 Report Posted March 31, 2015 Database lo column values update cheyyali. suppose table 'xyz' coumn 'abc' value 1000 unte i need to set that value to 2000. Ila chala tables lo cheyyali.. any script to do this for entire database to find those columns and set value ?? or individual ga every table cheyala??
Yuvatha Posted March 31, 2015 Author Report Posted March 31, 2015 pm spider cheddy he will help thanks
Darshwana Posted March 31, 2015 Report Posted March 31, 2015 system sp use chesi get list of all tables in to table variable n loop thru n update... column names etu different vundi vuntayi even if its the same column in diff tables.. if so... there is no easy way but to write update queries for each ... calling experts
Bairagi From Bapatla Posted March 31, 2015 Report Posted March 31, 2015 SELECT 'UPDATE ',name,' SET XYZ column=2000 WHERE XYZ column=1000' FROM sysobjects WHERE Type='U' vachina result set ni run chei
Yuvatha Posted March 31, 2015 Author Report Posted March 31, 2015 system sp use chesi get list of all tables in to table variable n loop thru n update... column names etu different vundi vuntayi even if its the same column in diff tables.. if so... there is no easy way but to write update queries for each ... calling experts i did that...anni update queries manager ki ivalante siggestundi
Yuvatha Posted March 31, 2015 Author Report Posted March 31, 2015 SELECT 'UPDATE ',name,' SET XYZ column=2000 WHERE XYZ column=1000' FROM sysobjects WHERE Type='U' vachina result set ni run chei :3D_Smiles: :3D_Smiles:
Bairagi From Bapatla Posted March 31, 2015 Report Posted March 31, 2015 :3D_Smiles: :3D_Smiles: but anni tables lo adhe column name undha?
Bairagi From Bapatla Posted March 31, 2015 Report Posted March 31, 2015 also check this http://blog.sqlauthority.com/2013/06/04/sql-server-script-to-update-a-specific-column-in-entire-database/
Yuvatha Posted March 31, 2015 Author Report Posted March 31, 2015 but anni tables lo adhe column name undha? kaduga :( each table has multiple columns with that data..
Bairagi From Bapatla Posted March 31, 2015 Report Posted March 31, 2015 kaduga :( each table has multiple columns with that data.. ha ha ala ayithe okko daniki okko update script rayalsinde...
Yuvatha Posted March 31, 2015 Author Report Posted March 31, 2015 also check this http://blog.sqlauthority.com/2013/06/04/sql-server-script-to-update-a-specific-column-in-entire-database/ idi kuda one column in all tables ki example
Yuvatha Posted March 31, 2015 Author Report Posted March 31, 2015 but anni tables lo adhe column name undha? 400 updates ivala :D
Darshwana Posted March 31, 2015 Report Posted March 31, 2015 i did that...anni update queries manager ki ivalante siggestundi column names different vunte evaraithe em chesthar
Recommended Posts