Results 1 to 8 of 8

Thread: Searching SQL Server Management Studio 2008

  1. #1

    Thread Starter
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    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

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  2. #2

    Thread Starter
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    Re: Searching SQL Server Management Studio 2008

    So I just wrote a simple query, which looks like this:

    SQL Code:
    1. 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

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  3. #3
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    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
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  4. #4

    Thread Starter
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    Re: Searching SQL Server Management Studio 2008

    Quote Originally Posted by techgnome View Post
    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

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  5. #5
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    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
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  6. #6

    Thread Starter
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    Re: Searching SQL Server Management Studio 2008

    Quote Originally Posted by techgnome View Post
    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

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  7. #7
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    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

  8. #8
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,969

    Re: Searching SQL Server Management Studio 2008

    Quote Originally Posted by weirddemon View Post
    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
  •  



Click Here to Expand Forum to Full Width