Jan-03-2022, 06:59 AM
Python Solution!
Source Table:
![[Image: SOURCE-2022-01-02-22-12-32.png]](https://i.ibb.co/2cN8vmY/SOURCE-2022-01-02-22-12-32.png)
download avatar instagram online
Current Destination Table:
![[Image: kapap-CURRENT-2022-01-02-22-11-53.png]](https://i.ibb.co/rk9z4zD/kapap-CURRENT-2022-01-02-22-11-53.png)
Solution:
![[Image: SOLUTION-2022-01-02-22-34-16.png]](https://i.ibb.co/YfNcSJf/SOLUTION-2022-01-02-22-34-16.png)
instagram photo full size download
Python Code:
I wish I knew how to "if row 1 = value = NULL then replace" *or something* !
Thank you everyone for this forum!
Best Regards,
Brandon Kastning
Source Table:
![[Image: SOURCE-2022-01-02-22-12-32.png]](https://i.ibb.co/2cN8vmY/SOURCE-2022-01-02-22-12-32.png)
download avatar instagram online
Current Destination Table:
![[Image: kapap-CURRENT-2022-01-02-22-11-53.png]](https://i.ibb.co/rk9z4zD/kapap-CURRENT-2022-01-02-22-11-53.png)
Solution:
![[Image: SOLUTION-2022-01-02-22-34-16.png]](https://i.ibb.co/YfNcSJf/SOLUTION-2022-01-02-22-34-16.png)
instagram photo full size download
Python Code:
# Finalized on Python-Forum.io # Disabled American Constitutional Pre-Law Student: BrandonKastning # Date: 01/02/2021 # Script: kravmaga_WTPO_IA.py # Purpose: Building Block for Python 3.9.9 + MariaDB 10.4.22 # Thread URL with Sources of Learning (Cited on Board) # Thread URL: https://python-forum.io/thread-35939-post-151485.html # Krav Maga # DB: Eggnest # Source Table: WTPO_Dirty_Wiki_Counties_IA # Destination Table: WTPO_Dirty_Wiki_Counties_IA_TWO # Purpose: Populate column "american_county_name" from Source Table to Destination Table import pymysql.cursors # Connect to the database connection = pymysql.connect(host='localhost', user='brandon', password='password', database='Eggnest', cursorclass=pymysql.cursors.DictCursor) with connection: with connection.cursor() as cursor: sql = "INSERT INTO `WTPO_Dirty_Wiki_Counties_IA_TWO` (`american_county_name`) SELECT `american_county_name` FROM `WTPO_Dirty_Wiki_Counties_IA`;" cursor.execute(sql)It works! However it doesn't start on row 1; it INSERTED new rows on top of all the nulled values within the 99 row range. Then added from 100+
I wish I knew how to "if row 1 = value = NULL then replace" *or something* !
Thank you everyone for this forum!
Best Regards,
Brandon Kastning
“And one of the elders saith unto me, Weep not: behold, the Lion of the tribe of Juda, the Root of David, hath prevailed to open the book,...” - Revelation 5:5 (KJV)
“And oppress not the widow, nor the fatherless, the stranger, nor the poor; and ...” - Zechariah 7:10 (KJV)
#LetHISPeopleGo
“And oppress not the widow, nor the fatherless, the stranger, nor the poor; and ...” - Zechariah 7:10 (KJV)
#LetHISPeopleGo