Link to home
Start Free TrialLog in
Avatar of regsamp
regsamp

asked on

Adding an item to a production table in SQL

How can we add a simple type item to a production table in SQL Server Management Studio? We would just like to add in one item. We have included a file of the table for an example.
Untitled.jpg
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

For starters, when adding images to a question please use the Image control (far right in comment toolbar), and not the Attach File control, so that the question and the image can be viewed without forcing experts to click back-and-forth.

Now, what exactly do you mean by 'simple type item', as the image doesn't give any clues.  
Translation:  Explain in very simple non-technical terms what you are trying to pull off here.
Avatar of regsamp
regsamp

ASKER

User generated image
We are trying just to type in a new PermitType in this table.
ASKER CERTIFIED SOLUTION
Avatar of Shaun Kline
Shaun Kline
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of regsamp

ASKER

The version of Studio Management is 10.50 but right-clicking on the table I am not getting an edit to add a row.
Avatar of regsamp

ASKER

Okay, I will look at the INSERT example put up here. I was just hoping to quickly edit it
If you are 'hoping to quickly edit it', then Shawn's answer may work for you.  
Right-click on the table, Edit Top 200 rows, then edit the set directly.
If what you want to edit isn't in the top 200, then you'll have to do it via T-SQL.

Also, by 'edit', are you ADDING NEW ROWS, which is an insert, or CHANGING EXISTING ROWS, which is an update?User generated image
Avatar of regsamp

ASKER

I am adding a new row and it is unfortunately not in the Edit Top 200 Rows. Can't you go down more rows?
One correction to Jim's statement.
If the item is not in the top 200 rows, you can filter the list of items shown by using the "Show Criteria Pane" or "Show SQL Pane" (found in the toolbar: Criteria Pane looks like a grid, and the SQL Pane has SQL on it) and applying the desired filter. These items can also be shown/hidden using the matching option in the Query Designer -> Pane menu.
No.  You'll have to execute the INSERT statements as described above.

Also, SQL Server is a database, and is not optimized for easy manual data entry.

Also, how many rows are you attempting to insert?  If its more than can be comfortably coded, then spell out where these rows currently exist, and we can recommend an import data/slightly different T-SQL solution.
Avatar of regsamp

ASKER

I am trying to add one row. It is a simple type of OUC. I thought I would be able to just type it in but okay, I will look at the INSERT
If you are adding and not editing a row, it won't be in the top 200 rows because it doesn't exist. Or am I missing something?

To add a new row, select the row with the asterisk in the margin and type in your new data.

User generated image
Building on Chris' comment above, if all you're looking for is a low-brain method to add records to a SQL Server table, and nothing else, then how about creating an Access application, creating a linked table to the SQL Server table you're talking about here, then just opening the table and editing away.

This way you wouldn't have to deal with / install SQL Server.
Avatar of regsamp

ASKER

I ended up just trying it with INSERT and it is working fine. I was worried I would ruin the table but no issues. . Thank you for the update though Chris and followup Jim.