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 |
TRACEYSQL
Aged Yak Warrior
594 Posts |
Posted - 2009-05-14 : 17:54:45
|
on a table you can do edit top 200 ...if there are say 250 records how can you do this so you can edit 250 records everytime i remove the top number and do a join on a table the cell is readonly and i wanted to update the records manually but it keeps saying read only on filed. |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2009-05-14 : 22:31:23
|
Why are you editing records manually in Management Studio? Use an UPDATE statement. |
|
|
TRACEYSQL
Aged Yak Warrior
594 Posts |
Posted - 2009-05-15 : 09:09:14
|
Do an update i.e update table set x = y ...i didn't want to write the update just user the editor ...can you explain what you mean. |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2009-05-15 : 09:29:09
|
quote: update table set x = y ...i didn't want to write the update just user the editor
Sorry, I don't mean to be critical, but YOU JUST WROTE THE STATEMENT. That's the exact syntax you'd use. You can't tell me that was harder than manually updating 250 rows in Management Studio. |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2009-05-15 : 10:06:41
|
If you want to change the Edit Top <n>, go to Tools -> options, select the SQL Server Object Explorer -> Commands and it is in there.But I would still do an update the way Rob says as it's much easier than manually editing and you are less likely to have moments of human error. |
|
|
TRACEYSQL
Aged Yak Warrior
594 Posts |
Posted - 2009-05-15 : 12:43:42
|
Thanks i did the change on the tools to 99999 ...if i have one or two joins in a select it comes back as CELL IS READ ONLY - none of the views allow you to edit the records.Yes agrees on the update but i not that clever at updates and having to join x records to get the data i just wanted to do it manually. :)Is there a way to change the show pane to not be read only on cell.......... |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2009-05-15 : 13:29:30
|
You can't edit in Management Studio if you have a join, but it's easy to do with an UPDATE:UPDATE A SET Col1=B.Col1FROM TableA AINNER JOIN TableB B ON A.ID=B.ID |
|
|
TRACEYSQL
Aged Yak Warrior
594 Posts |
Posted - 2009-05-20 : 18:21:00
|
Ok found the way to bring up sql pane.Just do create view and your in edit mode on the records just as if you did right click on table.If you do new query you can highlight sql and do right click query designer and choose update if want to change sql to an update.Phew.. |
|
|
|
|
|