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 7882293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:15:00+00:00 2026-06-03T04:15:00+00:00

Here are my 2 SQL tables: tblElevators ElevatorID (int, pk); Location (nvarchar); Manufacturer (nvarchar);

  • 0

Here are my 2 SQL tables:

  1. tblElevators
    ElevatorID (int, pk);
    Location (nvarchar);
    Manufacturer (nvarchar);

This table have nearly 7000 records, and Manufacturer field contains values from lookup table below (some values are Null)

  1. tblManufacturers
    Manufacturer (nvarchar, pk);

Now I want to insert a ID column in second table (tblManufacturers) which will be Integer and PrimaryKey. Since it have only 40 rows, I’ll put PK manually (1,2,3…40)

My question is – how I can change all existing Manufacturer values in tblElevators to new Integer value, withot manually going thru all the data and figuring out what “Manufacturer Name” now is ManufacturerID.

Thank you

  • 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-03T04:15:01+00:00Added an answer on June 3, 2026 at 4:15 am

    I am not really sure what you want. But it sound like you want something like this:

    UPDATE tblElevators 
    SET tblElevators.ManufacturerID=tblManufacturers.ManufacturerID
    FROM tblElevators 
    JOIN tblManufacturers
       ON tblElevators.Manufacturer = tblManufacturers.Manufacturer 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If i have SQL Server tables like this: Location ---------- LocationId int PK Field1
Here is my sql: CREATE TABLE companyprinciple { userid INT, FOREIGN KEY (userid) REFERENCES
Trying to have my PHP script return some SQL table queries. Here's my script
enter code here I have a table on SQL server 2005 with bigint primary
Querying a Nested Set Model table , here's the SQL... how can this be
I have 3 tables: products, products_description, products_to_categories Here is my sql: SELECT `products`.`products_model`, `products_description`.`products_name`
I have two sql tables called scan_sc and rescan_rsc . The scan table looks
Suppose i have the following 2 SQL tables: Foo Column DataType --------------------------- Title NVARCHAR(20)
i m having following type of simple sql server table Here I want to
In my legacy web application, here is the structure of customer table in sql

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.