User Profile

Collapse

Profile Sidebar

Collapse
NightZEN
NightZEN
Last Activity: Feb 4 '10, 12:58 AM
Joined: Feb 1 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Thanks for your help! this did the trick:

    UPDATE [mfgtest803].[dbo].[partplant]
    SET [reschedindelta] = '15'
    FROM [mfgtest803].[dbo].[partplant] JOIN [mfgtest803].[dbo].[partWhse] ON ([partplant].[partnum]=[partWhse].[partnum])
    WHERE (([partplant].[partnum]
    NOT IN
    (SELECT [partWhse].[partnum] FROM [mfgtest803].[dbo].[partWhse] WHERE [partWhse].[WarehouseCode]<>'120'))...
    See more | Go to post

    Leave a comment:


  • got it - thanks. I will give that a try. I will need the sub-q.
    See more | Go to post

    Leave a comment:


  • thanks CG! That was it. (sorry about the bolding)

    I now have this q:

    UPDATE [mfgtest803].[dbo].[partplant]
    SET [reschedindelta] = '15'
    FROM [mfgtest803].[dbo].[partplant] JOIN [mfgtest803].[dbo].[partWhse] ON ([partplant].[partnum]=[partWhse].[partnum])
    WHERE (([partplant].[safetyqty]>'0')OR([partplant].[minimumqty]>'0'))AND
    (([partWhse].[WarehouseCode]='120') AND([partWhse].[WarehouseCode]<>'320'))...
    See more | Go to post

    Leave a comment:


  • NightZEN
    started a topic Update using a join in the where clause

    Update using a join in the where clause

    I am trying to run this update qry in SQL Server:

    UPDATE [mfgtest803].[dbo].[partplant]
    SET [reschedoutdelta] = '1'

    WHERE ([partplant].[partnum] = [partWhse].[partnum])AND
    (([partplant].[safetyqty]>'0')OR([partplant].[minimumqty]>'0'))AND
    ([partWhse].[WarehouseCode]='120')


    I get the following errors:

    Msg 4104, Level 16, State 1, Line 1
    The multi-part
    ...
    See more | Go to post
No activity results to display
Show More
Working...