Results 1 to 2 of 2
  1. #1
    Join Date
    May 2003
    Posts
    23

    Arrow Unanswered: update columns and FULL OUTER JOIN queries..pls advise.

    Let's say a query as follows:
    Code:
    SELECT     dbo.Worker.Worker_ID, dbo.Contractor_Worker.Worker_ID AS b
    FROM         dbo.Worker FULL OUTER JOIN
                          dbo.Contractor_Worker ON dbo.Worker.Worker_ID = dbo.Contractor_Worker.Worker_ID
    WHERE     (dbo.Contractor_Worker.Worker_ID IS NULL)
    A column Worker_ID and b will be returned. All the values in b will be NULL.

    How to update the columns of the worker table where the above is NULL?

    Please advise. THanks.

  2. #2
    Join Date
    Sep 2003
    Location
    Switzerland
    Posts
    11

    Re: update columns and FULL OUTER JOIN queries..pls advise.

    Just a little Update Satetment should do.
    Please check exactly what you want the Workder ID to be.

    Update dbo.Contractor_Worker
    set Worker_ID = dbo.Worker
    FROM dbo.Worker FULL OUTER JOIN
    dbo.Contractor_Worker ON dbo.Worker.Worker_ID = dbo.Contractor_Worker.Worker_ID
    WHERE (dbo.Contractor_Worker.Worker_ID IS NULL)

    Hope that this helps :-)
    HandyMac



    Originally posted by fused
    Let's say a query as follows:
    Code:
    SELECT     dbo.Worker.Worker_ID, dbo.Contractor_Worker.Worker_ID AS b
    FROM         dbo.Worker FULL OUTER JOIN
                          dbo.Contractor_Worker ON dbo.Worker.Worker_ID = dbo.Contractor_Worker.Worker_ID
    WHERE     (dbo.Contractor_Worker.Worker_ID IS NULL)
    A column Worker_ID and b will be returned. All the values in b will be NULL.

    How to update the columns of the worker table where the above is NULL?

    Please advise. THanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •