August 13, 2013 at 2:35 pm
I ran a select statement like below in query window but it can't be modified.
select * from Order
I have to right click Order table from object explore, select "edit 200 rows".
How to make select statement be editable?
August 13, 2013 at 2:43 pm
Are you running the query from a saved file? I mean the query is saved in an .sql file? Check if the file has Read-only attributes.
August 13, 2013 at 2:44 pm
Not file. I just type in
August 13, 2013 at 2:45 pm
Do you mean that you want to edit the results of a SELECT statement? That can't be done.
Right clicking the table and selecting "edit 200 rows", will change the contents of the table, but you should do it with INSERT & UPDATE statements or a front-end client such as a winform or web application (which will have the INSERT & UPDATE statements).
If you just want to modify the results, you should copy and paste them in another program such as Excel.
August 13, 2013 at 2:46 pm
I am confused. Are you typing in a query or using the Edit top 200 menu option? I would urge you to write your queries instead of using the edit option but there is nothing that prevents you from editing the sql in the window.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
August 13, 2013 at 2:51 pm
Choose your Edit 200...
Then select the button: 'Show SQL Pane'
then change the 200.
August 13, 2013 at 3:07 pm
richard.noordam, I just use your way but I am tired to change 200 every time.
I just want to find a way to modify SQL server setting to make job easier.
August 13, 2013 at 3:09 pm
this article describes how to change the default.
is that what you are looking for?
August 13, 2013 at 3:11 pm
adonetok (8/13/2013)
richard.noordam, I just use your way but I am tired to change 200 every time.I just want to find a way to modify SQL server setting to make job easier.
I don't think there is anyway you can change that.
Honestly how often do you need that functionality where you just need to open a table and start changing values like that? The only time I can see where that would make sense is for modifying test data. I would bet that whatever you are doing would be much easier to write update statements instead of using the edit grid.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
August 13, 2013 at 3:14 pm
Thank you so much, richard.noordam
This is just what I am looking for.
August 13, 2013 at 3:14 pm
indicates that if you set it to 0 that it returns them all.
i tested it and it seems to work.
August 13, 2013 at 3:15 pm
Sean Lange (8/13/2013)
I am confused. Are you typing in a query or using the Edit top 200 menu option? I would urge you to write your queries instead of using the edit option but there is nothing that prevents you from editing the sql in the window.
Do you know how to use the UPDATE statement?
--Jeff Moden
Change is inevitable... Change for the better is not.
August 13, 2013 at 3:17 pm
Jeff Moden (8/13/2013)
Sean Lange (8/13/2013)
I am confused. Are you typing in a query or using the Edit top 200 menu option? I would urge you to write your queries instead of using the edit option but there is nothing that prevents you from editing the sql in the window.Do you know how to use the UPDATE statement?
LOL I will assume that you got bitten by the quote bug Jeff. I think it is safe to say I could muddle my through one with minimal hand holding. 😀
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
August 13, 2013 at 3:25 pm
LOL, i'm quite certain that I could as well. 😉
I have found that there are certain times that i'll go one route using the update statement, but will also adjust some of our lastrowcount tables by hand. (a check method we use to make sure the data we get isn't way out of wack)
It really depends. I certainly could do ALL updates by using the update statements. maybe i'm occasionally lazy and do it by hand too....
August 14, 2013 at 8:02 am
If I change top 200 to top 1000, does this change only apply for my account?
Viewing 15 posts - 1 through 14 (of 14 total)
You must be logged in to reply to this topic. Login to reply