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 2008 Forums
 Transact-SQL (2008)
 Edit table from cell with inner join?

Author  Topic 

taunt
Posting Yak Master

128 Posts

Posted - 2014-01-23 : 14:12:45
I have a table that I need to edit. Here's the query that I do:


SELECT Items.SKU, Items.UPC, Items.Artist, Items.ItemName, Items.StockQty, Items.Vendor
FROM Items INNER JOIN
Updatedelete ON Updatedelete.UPC = Items.UPC


That displays a cell that is read only. How can I have it display a cell that I can delete rows from, and it will delete the row from Items?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2014-01-23 : 14:18:16
Use T-SQL to do your queries not the GUI.

Here is an example delete:

DELETE Items
FROM Items
JOIN Updatedelete ON Updatedelete.UPC = Items.UPC
WHERE Items.SomeColumn = 14

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

taunt
Posting Yak Master

128 Posts

Posted - 2014-01-23 : 14:34:28
Unfortunately I have to do some research on each piece to see if it is actually deleted. Our database provider likes to delete a lot of items that the vendor still carries. I guess I could look up by UPC in items for each deleted piece in question, but I thought there might be an easier way to display the results listed above that I could edit the cell from SQL and not have to create a new query.


quote:
Originally posted by tkizer

Use T-SQL to do your queries not the GUI.

Here is an example delete:

DELETE Items
FROM Items
JOIN Updatedelete ON Updatedelete.UPC = Items.UPC
WHERE Items.SomeColumn = 14

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2014-01-23 : 15:02:09
All of that research can be done via T-SQL. The GUI is very limited in what it can do.

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -