views:

52

answers:

4

I am needing to edit several text fields in a SQL Server database. What would be the best way of doing this? The only solution I have so far is writing an update statement(along with escaping quotes and such) to update it.. This just seems really cumbersome though. Is there a better way?

A: 

You should be able to right-click the Table and choose "Open Table" to get the datasheet view--then you can browse to the one you want and make changes as needed.

ewall
this won't work with text fields though. You can't enter more than one line of text
Earlz
Hrm... and Alt-Enter doesn't work for a new line, like with other Micro$oft programs? When I get back to the office in the morning, I'll give it a try. I bet we can figure it out.
ewall
A: 

If you select "Edit Top X Rows" on the table where you want to edit the text you can then modify the SQL that returns the data in the editable grid, so you can edit a single row (or exactly the rows you want) directly.

To modify the SQL, click on the button that reads "SQL", usually on the leftish side of the screen, if you haven't rearranged the toolbars.

alt text

alt text

Vinko Vrsalovic
I'm not seeing this option
Earlz
A: 

Though it's not the best solution, I have created a quick tool to generate such update statements for me. It is freely available here: http://jsbin.com/otake/latest

Earlz
A: 

Quick and dirty: use and MS Access data project

  • gives you a smarter data editor than SSMS on the tables
  • you can wizard up a bound form with multi-line text box
gbn
I don't have MS Access...
Earlz