Python Forum
Mysql and data manipulation
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mysql and data manipulation
#1
Hi Everyone,

I am fairly fresh to python and mysql and despite my hours of reading on this I cannot work out what I need to do to achieve the below:

I have a series of numbers in a table that are 100 number ranges but instead of having a 100 number range as individual numbers the table contains 1xx to show the number as a 100 number range. What I am trying to achieve is have python change the 1xx to individual numbers and then send put the individual numbers in a separate table.

This is possible but I just don't know here to look or I am googling the wrong thing altogether.


Thanks in advance


Adam
Reply
#2
Your table value explanation is not clear to me. Please explain it better

Per my understanding, your table named x is having few columns and rows and where the 100 range number value is mapped. Is it a row value or column name? And what is 1xx mean?
Reply
#3
Hi Malt,

I have a table that contains customers names, their ID and phone number range. To represent a 100 number range we use xx for the last 2 digits of the phone number. I want to basically either add 100 entries to the same table or move the data to a new table wit hthe same columns and add the 100 records.

Hopefully this makes sense.
Reply
#4
So your ask is, you are having table called X which already has data. In that you additionally wants to add 100 more records, otherwise you want to move those 100 records to a new table. Is it right?

But where the 100 number range value you are using? is it for ID?
Reply
#5
Hi Malt,

So numbers are under the numbers column in mysql I essentially want to take the numbers from 1 table and create the 100 numbers in another table where a number contains xx and have it populate from 00 to 99
Reply
#6
how you determine whiche xx is 00 and which 99 :-)
in sql one can retrieve data and order as they wish

and that's just the start. we don't know table names, field names, is the target table new/empty one or values need to be updated. is it created in advance or it should be created in the code, do you want to drop it if exists or raise error, and so on and so on...
You need to provide us with some code you have written and ask questions
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Using MySQL database images or data dumps Planetary_Assault_Systems 1 1,802 Jul-20-2021, 04:40 PM
Last Post: Larz60+
  Problem with saving data and loading data to mysql kirito85 4 3,913 Feb-08-2019, 10:53 AM
Last Post: kirito85
  Pushing mysql db data from one schema to another schema? PrateekG 2 3,102 May-31-2018, 06:52 AM
Last Post: PrateekG

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020