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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:21:40+00:00 2026-05-10T23:21:40+00:00

My company performed a data migration recently (in a SQL Server 2005 database) and

  • 0

My company performed a data migration recently (in a SQL Server 2005 database) and we noticed that some tables created with SELECT INTO didn’t maintained the calculated fields of the original tables, but instead SQL Server created regular fields with the type returned by the original calculation. For example, suppose that you have this table:

create table Example (  id int not null,  quantity decimal(19,5) not null,  price decimal(19,5) not null,  total as price*quantity  ) 

after doing a SELECT * INTO Example2 FROM Example you get:

create table Example2 (  id int not null,  quantity decimal(19,5) not null,  price decimal(19,5) not null,  total decimal(38,9) null ) 

I fixed it dropping the bad fields and recreating them, but I want to know if there is a way of maintaining the calculated fields in the table created with the SELECT INTO (maybe with some special SQL Server configuration or using an alternative SQL command).

Thanks in advance.

  • 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. 2026-05-10T23:21:41+00:00Added an answer on May 10, 2026 at 11:21 pm

    I don’t think you would be able to do this with SELECT INTO – Just like if you were selecting against a view, it’s just taking the results and pumping them to a new table.

    You’ll likely need to create the table with the computed columns first, then do a regular insert from the source table of the non-computed columns.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 118k
  • Answers 118k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Short answer: No. Long answer: Ajax is just a term… May 11, 2026 at 11:33 pm
  • Editorial Team
    Editorial Team added an answer Your problem is likely to be in this line: realloc(NovoEstado->instrucao,… May 11, 2026 at 11:33 pm
  • Editorial Team
    Editorial Team added an answer ++x is called preincrement while x++ is called postincrement. int… May 11, 2026 at 11:33 pm

Related Questions

My company is currently in the process of creating a large multi-tier software package
I'm about to start a fairly Ajax heavy feature in my company's application. What
I have two databases, one is an MS Access file, the other is a
I'm using the Apache Cocoon framework, set up several eons ago for the web

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.