Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
tahseenm
Yak Posting Veteran
64 Posts |
Posted - 2013-01-24 : 10:08:02
|
How to do a quick search on a particular record with in a table. Let me know the details or the script to get to the record you are looking for out of 29,000 records I would like to go to this particular record in a table to change few things.Table name is billing.acct and the fields names i am looking is as follows:accountnumber,finalbillflag,credflagThanks and appreciate your quick response.moetahsen |
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2013-01-24 : 12:47:19
|
Something like shown below-- see if the record exists in the table.select * from billing.acctwhere accountnumber = '1234' and finalbillflag = 'F' and credflag = 'N';-- update columns in the record.update billing.acct set closeoutdate = '20121231', closedby = 'tahseenm'where accountnumber = '1234' and finalbillflag = 'F' and credflag = 'N'; |
|
|
tahseenm
Yak Posting Veteran
64 Posts |
Posted - 2013-01-24 : 15:02:45
|
So I use the second script to update or some changes on it. Let me know. I need to update the record that has the accountnumber=56073-06, finalbilling=Y, credflag=Y. Currently the record has finalbilling=N,credflag=NLet me know. Thanksmoetahsen |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-01-25 : 01:32:48
|
quote: Originally posted by tahseenm So I use the second script to update or some changes on it. Let me know. I need to update the record that has the accountnumber=56073-06, finalbilling=Y, credflag=Y. Currently the record has finalbilling=N,credflag=NLet me know. Thanksmoetahsen
try it first on test tableit should give you what you've asked foronce happy do it on actual table------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|