November 1, 2009 at 2:18 pm
Hi,
I am trying to copy minimum stock levels in a sotck table, ie. set all min stock levels for
branch 3 the same as branch 1.
I tried this... but the select returns multiple values so doesn't work.
Can anyone help please?
UPDATE [Stock Detail]
SET [Minimum Stock Level] = (SELECT [Minimum Stock Level]
FROM [Stock Detail] WHERE [Branch ID] = '1')
WHERE [Branch ID] = '3'
November 1, 2009 at 4:10 pm
It would be best if you would post the details of each of the tables, and what foreign keys exist in them in order for some one to give you a detailed answer. Read the link in my signature block and post the requested / suggested input. For example do both the branches contain the same item idenfification or do all items in a given branch have the same minimum stock level (highly unlikely)
November 1, 2009 at 4:42 pm
Hi, thanks for the quick reply.
For the table details you want the complete create table queries ? they are quite large. 🙂
Neil.
November 2, 2009 at 7:50 am
For example do both the branches contain the same item identification
It would be productive, that is getting you some assistance, to include any foreign keys, pertinent constraints but not the entire table definition. And of course some sample data, but not such that it would reveal sensitive information and place your company at what could be a competitive disadvantage.
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply