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
 General SQL Server Forums
 New to SQL Server Programming
 Need to provide access to external group

Author  Topic 

donjt81
Starting Member

11 Posts

Posted - 2012-03-19 : 10:17:11
HI I have 2 tables a follows

Product:
ID Name OrderableID
101 Phone 1
201 computer 2
301 TV 3
401 Lamp 1

Orderability:
ID Status
1 Available
2 Low inventory
3 Discontinued

Another group needs to update the statuses of the items in my Product table. For ex. Phone today is in Available status, Tomorrow it might go to Low inventory. So the external group will update the orderability to Low inventory.

I was thinking about providing a view to them but the view only updates one table. Whats the best way to handle this. The external group may add new orderability statuses as well.

For ex. they might say phone is now going to be status - "Active"

My view or stored Proc needs to detect that this is a new status. Add it to the status table and use the new ID for the product Phone.

X002548
Not Just a Number

15586 Posts

Posted - 2012-03-19 : 10:42:24
Please Define "External Group"

And yes, I like views, but not to update 2 tables..I don't think that's possible

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page

donjt81
Starting Member

11 Posts

Posted - 2012-03-19 : 11:00:45
External Group = within the same company but in a different organization. Right now they are not updating any of my tables. I have created a user name and pwd for them and created a view so they can 'read' the data. But now they have to update data in my tables.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2012-03-19 : 11:56:59
Post the View you have...I'm guessing you granted the ID SELECT to the View

Is this other group only allowed to see certain data and not all?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page

donjt81
Starting Member

11 Posts

Posted - 2012-03-19 : 12:28:46
SELECT p.Name, o.Status as 'Orderability Status'
FROM Product p INNER JOIN Orderability o
ON Product.OrderableId = Orderability.ID
Go to Top of Page
   

- Advertisement -