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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:47:03+00:00 2026-06-10T11:47:03+00:00

I have a database which holds Quotations and Product Configurations, there is one header

  • 0

I have a database which holds Quotations and Product Configurations, there is one header table for a Quotation under which there may be one or more Configurations. Within a configuration there are tables which define products and hardware in shades of one to one and one to many. If a customer wishes to alter any aspect of a quotation the current quotation must be frozen and another produced with a different quotation number. The quotation number is an auto ident field in the header table.

I wrote a long winded cloning script that worked at the start but as additional columns were required the cloning script quickly got out of date. This leaves sales support with the job of having to clone the quotation by hand which can often lead to mistakes.

How would you approach this in such a manner as to easily define the relationships, propogate the new id whilst not having to explicity specify all the columns in each table?

  • 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-10T11:47:05+00:00Added an answer on June 10, 2026 at 11:47 am

    You can

    SELECT * 
    INTO #tableN
    FROM tableN
    WHERE QuotationID = @OldQuotationID
    

    into temp tables for each of the tables involved, so that you don’t have to know the exact schema of each table. Then, after you’ve created the new header row and captured the new QuotationId value, you can update these tables with the new QuotationID and insert them back into the tables they came from.

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

Sidebar

Related Questions

I have a table in Postgres database logs which holds the error logs with
I have the following scenario, using mvc3: I have a database table which holds
I have a log table in my database which holds all user actions. In
Within a table in my database I have a table which holds IDs (Integers)
I have a database which holds URL's in a table (along with other many
I have a database table which holds meta data about images, the field in
I have a database table which holds each user's checkins in cities. I need
I have a MySQL database table which holds 6 types of records I need
I have a database table which currently holds geometric data in SRID 27700 (British
I have a huge database which holds pairs of numbers (A,B), each ranging from

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.