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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:09:14+00:00 2026-06-12T23:09:14+00:00

I found some options to run a mysql query to migrate/split one table into

  • 0

I found some options to run a mysql query to migrate/split one table into 2 new tables, but one of the fields I would like to create on the new table has to be the same as in the other new table:

So from the “From_payments” table, I would like to create 2 new tables called: “To_paymenttransaction” and “To_paymentinfo”. A lof of the field are predefined and some are from the old table. The only problem is that the predefined field “paymentinfoid” has to be the same is both new tables.

**To_paymenttransaction** --- < --- **From_payments**

paymenttransactionid ------- < --- (Generate next available number in this column)

paymentinfoid -------------- < --- (Generate next available number in this column)

transactionid --------------- < --- txn_id

state ---------------------- < --- (Set all to "1")

amount -------------------- < --- mc_gross

currency ------------------- < --- mc_currency

dateline -------------------- < --- payment_date

paymentapiid --------------- < --- (Set all to "1")

request -------------------- < --- (Set all to "NULL")

reversed ------------------- < --- (Set all to "0")

**To_paymentinfo** -----------< 

paymentinfoid -------------- < --- (Same generated number that goes to the paymentinfoif field in To_paymenttransaction table )

hash ----------------------- < --- (Set all to "Imported")

subscriptionid --------------- < --- (Set all to "1")

subscriptionsubid ------------ < --- ("2" IF above field mc_gross is 4, "1" IF above field mc_gross is 6, "0" IF above field mc_gross is 10)

userid   ---------------------- < --- userid

completed ------------------ < --- (Set all to "0")

Any ideas?

All help is greatly appreciated.

  • 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-12T23:09:16+00:00Added an answer on June 12, 2026 at 11:09 pm

    Maybe generate the paymentinfoid on the original table before you split it. Then you can copy that single entry into each of the new tables.

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

Sidebar

Related Questions

I found some classes designed for debugging in package com.sun.jdi like VirtualMachine , but
I want to run an import of a large file into MySQL. However, I
I've run into reoccuring problem for which I haven't found any good examples or
I could use some architectural advice. I've run into the following problem a few
Hello people of StackOverflow! I have used the searrch option, I've found some related
I found some lovely websites - http://www.mini.jp/event_campaign/big-point/ , http://www.twenty8twelve.com/ and http://www.scozzese.com - all vertical
I found some problems when implementing Jake Wharton 's ViewPagerIndicator . These are what
I found some things I want to submit a pull request for in the
I found some old Python code that was doing something like: if type(var) is
I found some really great code from Matt Gallagher for use with making Undo

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.