Yuvatha Posted March 31, 2015 Report Share 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?? Link to comment Share on other sites More sharing options...
teliyadu_nuvvu Posted March 31, 2015 Report Share Posted March 31, 2015 pm spider cheddy he will help Link to comment Share on other sites More sharing options...
Yuvatha Posted March 31, 2015 Author Report Share Posted March 31, 2015 pm spider cheddy he will help thanks Link to comment Share on other sites More sharing options...
Darshwana Posted March 31, 2015 Report Share 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 Link to comment Share on other sites More sharing options...
Bairagi From Bapatla Posted March 31, 2015 Report Share 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 Link to comment Share on other sites More sharing options...
Yuvatha Posted March 31, 2015 Author Report Share 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 Link to comment Share on other sites More sharing options...
Yuvatha Posted March 31, 2015 Author Report Share 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: Link to comment Share on other sites More sharing options...
agora Posted March 31, 2015 Report Share Posted March 31, 2015 Link to comment Share on other sites More sharing options...
Bairagi From Bapatla Posted March 31, 2015 Report Share Posted March 31, 2015 :3D_Smiles: :3D_Smiles: but anni tables lo adhe column name undha? Link to comment Share on other sites More sharing options...
Bairagi From Bapatla Posted March 31, 2015 Report Share 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/ Link to comment Share on other sites More sharing options...
Yuvatha Posted March 31, 2015 Author Report Share Posted March 31, 2015 but anni tables lo adhe column name undha? kaduga :( each table has multiple columns with that data.. Link to comment Share on other sites More sharing options...
Bairagi From Bapatla Posted March 31, 2015 Report Share Posted March 31, 2015 kaduga :( each table has multiple columns with that data.. ha ha ala ayithe okko daniki okko update script rayalsinde... Link to comment Share on other sites More sharing options...
Yuvatha Posted March 31, 2015 Author Report Share 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 Link to comment Share on other sites More sharing options...
Yuvatha Posted March 31, 2015 Author Report Share Posted March 31, 2015 but anni tables lo adhe column name undha? 400 updates ivala :D Link to comment Share on other sites More sharing options...
Darshwana Posted March 31, 2015 Report Share Posted March 31, 2015 i did that...anni update queries manager ki ivalante siggestundi column names different vunte evaraithe em chesthar Link to comment Share on other sites More sharing options...
Recommended Posts