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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Edit Top 200 Rows

Author  Topic 

mikebird
Aged Yak Warrior

529 Posts

Posted - 2009-03-30 : 08:11:38

Handy quick tool in the Tables tree in SSMS, which I think is new to 2008?

Good balance between coming up with a function to get such a job done on a table, however big, or could save time by editing manually, if small.

I wouldn't want to edit more than 200 rows! No more than 10! But my table has 410 rows and you need to scroll between them all. I have just 3 rows to change.

Doesn't matter today, but I can see this being a bigger issue another time.

Wish I could change that 200 parameter to anything else - such as filter anything with WHERE, but also JOIN, GROUP and HAVING... do a SELECT but then edit your results like a spreadsheet, but COMMIT that! Could you ever do that before?

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-03-30 : 08:21:31
You can use SSMSToolsPack add-in for that. I do all the time.
Do you SELECT and then use SCRIPT GRID RESULTS to new query window.

You will get all data and column names. Do some cut and paste to suite your needs.



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

jkjeer
Starting Member

2 Posts

Posted - 2009-04-27 : 10:15:40
Not as useful as a "where" filter but you can change the 200 to another value: Tools | Options | SQL Server Object Explorer. At least then you could see all your 410 rows at one time.
Go to Top of Page

jkjeer
Starting Member

2 Posts

Posted - 2009-04-27 : 10:21:12
You can do this in SSMS: Say "Edit Top 200 Rows" like usual, then right click in the result set and say "Pane | SQL". You can now add a where clause, order by, whatever. F5 doesn't work in this mode, you have to click on then ! toolbar button to execute the SQL.
Go to Top of Page

Syxty9yN
Starting Member

1 Post

Posted - 2009-12-01 : 08:29:29
Tools/Options/SQL Server Object Explorer/Commands Click on Value For Edit <n> Rows Command and change the value to '0' for both values and OK

Voala

Glad to be of service compadreZ

JEDI

EDIT:
edited potentialy offensive laguange
Go to Top of Page
   

- Advertisement -