Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8617855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:58:02+00:00 2026-06-12T05:58:02+00:00

I have two tables; Technology Look Up table OSID OSValue 1 UNIX 2 ORACLE

  • 0

I have two tables;

Technology Look Up table

OSID  OSValue  

1     UNIX             
2     ORACLE            
3     .NET 
4     SQL    
5     SAP  

------------------

Employee technology

empID   OSID

34      1
37      2
45      2
34      4
45      6

Employee ID NO 37 is no more using ORACLE . He shifted to SAP . That is OSID should b updated from 2 to 5 in the second table .

I have a temp table that has vales for technology and employee id

Please help me with
– writing a query that joins both above tables
– Look up the ID of the SAP technology , and update the second table with that ID .

Update emp
Set emp.OSID = (Select OSID from technologylookup where OSValue = tmptbl.technologyname)
FROM employee_tech emp INNER JOIN #Temptbl tmptbl ON emp.emp_id = tmptbl.emp_id
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T05:58:04+00:00Added an answer on June 12, 2026 at 5:58 am

    Join your lookup table to the temp table, and then update the employee_tech table with the ID from that table

    Update emp
       Set emp.OSID = tl.OSID
    FROM employee_tech emp 
    INNER JOIN #Temptbl tmptbl 
       ON emp.emp_id = tmptbl.emp_id
    INNER JOIN technologylookup tl
       ON tl.OSValue COLLATE DATABASE_DEFAULT = tmptbl.technologyname
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two tables: table a ida valuea 1 a 2 b 3 c
I have two tables one with ID and NAME table 1 ID | NAME
I have two tables user table user_id | name | 1 | peter |
I have two tables, a user table and a application table: User id username
I have two tables connected with one to many relationship. Parent Table is a
I have two tables threads table _id recipient_id type 1 1 2 1 3
I have two tables: one table (okay, it's a view), vComputer, lists many computers
I have two tables, orders and old_orders. Each table has some similar fields and
I have two tables in my database. A person and a coach table. The
I have two tables, namely Price List (Table A) and Order Record (Table B)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.