|
-
Oct 19th, 2011, 01:29 PM
#1
Searching SQL Server Management Studio 2008
I need to find a record in a SQL database and be able to manually edit the data. So far, I can't seem to find a quick method to just find the record by specific column data.
Does anyone know of any quick and simple methods to do this?
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Oct 19th, 2011, 01:40 PM
#2
Re: Searching SQL Server Management Studio 2008
So I just wrote a simple query, which looks like this:
SQL Code:
SELECT * FROM _table WHERE _column='string'
It shows the row data... but I can't edit it at all. Any ideas? I know running a 'query' probably means just that. But, surely there's a way to find a row and edit the data manually, right?
Last edited by weirddemon; Oct 19th, 2011 at 01:48 PM.
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Oct 19th, 2011, 01:57 PM
#3
Re: Searching SQL Server Management Studio 2008
you mean like a simple select statement?
select * from someTable where someField = someCriteria?
that's what I use... and then to update:
update tblSomething
set field = newvalue
where someField = someCriteria
-tg
-
Oct 19th, 2011, 01:59 PM
#4
Re: Searching SQL Server Management Studio 2008
 Originally Posted by techgnome
you mean like a simple select statement?
select * from someTable where someField = someCriteria?
that's what I use... and then to update:
update tblSomething
set field = newvalue
where someField = someCriteria
-tg
I did the select. And I'm doing the update now, but I want to be able to see the entire row and update it in the designer, to make sure I'm not messing up anywhere. I'd feel a lot more comfortable than running an update.
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Oct 19th, 2011, 02:03 PM
#5
Re: Searching SQL Server Management Studio 2008
SQL Server doesn't work that way... there's apps out there that allow the "Editing" of the data in a grid, but it's just running Updates on the back end....
Don't want to mess things up? Me neither... that's why I'll put BEGIN TRANSACTION before I start mucking with the data... I'll then add a COMMIT TRANSACTION and a ROLLBACK TRANSACTION at the end and comment them out... then when the update runs, it's in a transaction... if things go wrong, I select ROLLBACK TRANSACTION and run it... if things are ok,... I can run a couple of quicjk queries to check the data and if it's good COMMIT TRANSACTION
-tg
-
Oct 19th, 2011, 02:25 PM
#6
Re: Searching SQL Server Management Studio 2008
 Originally Posted by techgnome
SQL Server doesn't work that way... there's apps out there that allow the "Editing" of the data in a grid, but it's just running Updates on the back end....
Don't want to mess things up? Me neither... that's why I'll put BEGIN TRANSACTION before I start mucking with the data... I'll then add a COMMIT TRANSACTION and a ROLLBACK TRANSACTION at the end and comment them out... then when the update runs, it's in a transaction... if things go wrong, I select ROLLBACK TRANSACTION and run it... if things are ok,... I can run a couple of quicjk queries to check the data and if it's good COMMIT TRANSACTION
-tg
Ah, gotcha. Sounds good. I'll do that then.
Thanks, TG.
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Oct 19th, 2011, 02:36 PM
#7
Re: Searching SQL Server Management Studio 2008
If you wish to edit data visually in a grid, try out Toad For SQL Server (freeware).
Click this link and look at the panel on the left where it says "Freeware" under "Downloads".
You do need admin privileges to install this tool.
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
save a blobFileStreamDataTable To Text Filemy blog
-
Oct 20th, 2011, 10:24 AM
#8
Re: Searching SQL Server Management Studio 2008
 Originally Posted by weirddemon
I did the select. And I'm doing the update now, but I want to be able to see the entire row and update it in the designer, to make sure I'm not messing up anywhere. I'd feel a lot more comfortable than running an update.
In SQL Server Management Studio you can right click on the table and select "Edit top 200 rows". Once they come up right click on the grid, from the menu select Pane then SQL. Edit the query to bring back what you want and then you can edit it right from there.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|