Sponsored Content
Top Forums Programming MYSQL merge csv data with exisiting table Post 302997257 by barrydocks on Wednesday 10th of May 2017 10:05:23 AM
Old 05-10-2017
MYSQL merge csv data with exisiting table

I have a MYSQL table with demographic data. The addresses contained in the table were entered manually before the advent of online postcode lookup software and, hence, there are a lot of errors when using automated online mailing checking software. I plan to export the data as csv file for a 3rd party to do a bulk correction and then reimport the data. The problem is that the database will continue to be used and the demographic table also includes other data (such as dates and times, etc) than might change in the meantime, for example each row will have the following fields:
Code:
ID, Surname, firstname, dob, street, address2, town, county, postcode, tel, email, dateseen, nextdate

Obviously the address fields for some records will change in the csv file and the date fields may change in the original database table. So how do I go about importing the corrected data fields while leaving the unchanged fields that same? Would it be sensible to export only the address fields?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help Inserting data in mysql table

Cant understand the error #!/bin/bash temp="" A="" D=$(date +"%Y-%m-%d") H=$(date +"%R") temp=$(wget -q -O - website | grep -o "Temperature:]**" | grep \-E -o "+") mysql -D "weather_wise" -e "INSERT INTO weather (Date, Hour, Degrees) VALUES ($D,$H, $temp)"; my data types for... (11 Replies)
Discussion started by: vadharah
11 Replies

2. Shell Programming and Scripting

select data from oracle table and save the output as csv file

Hi I need to execute a select statement in a solaris environment with oracle database. The select statement returns number of rows of data. I need the data to be inserted into a CSV file with proper format. For that we normally use "You have to select all your columns as one big string,... (2 Replies)
Discussion started by: rdhanek
2 Replies

3. UNIX for Dummies Questions & Answers

Storing data from a table into a csv file

Hi I need to write a bash script to take the data stored in 3 oracle tables .. and filter them and store the results in a csv file. It is an Oracle database Thank you (1 Reply)
Discussion started by: ladyAnne
1 Replies

4. Shell Programming and Scripting

how to print out data from mysql table in perl script

I'm having trouble with this code. if i do .\read.pl -u user it prints out 2010-12-20 12:00:00 host1 <cmd>a 2010-12-20 12:00:01 host1 <cmd> <execute> 2010-12-20 12:00:02 host1 <cmd>b 2010-12-20 12:00:03 host1 <cmd>c however, if i enter .\read.pl -h host1 it should... (3 Replies)
Discussion started by: kpddong
3 Replies

5. UNIX and Linux Applications

mysql table disappear

I have set a mysql file to excute everyday morning to generate a html file displayng 2 tables from the database. Sometime they cannot be shown, and it shows the tables are not existed. I have not drop any table, and those 2 tables are not used by any other excution. Anybody know what is happening?... (0 Replies)
Discussion started by: c203040
0 Replies

6. Shell Programming and Scripting

Merge Two Tables with duplicates in first table

Hi.. File 1: 1 aa rep 1 dd rep 1 kk rep 2 bb sad 2 ss sad 3 ee dam File 2 1 apple fruit 2 mango tree 3 lilly flower output: 1 aaple fruit aa,dd,kk rep (7 Replies)
Discussion started by: empyrean
7 Replies

7. UNIX for Dummies Questions & Answers

Need help combining txt files w/ multiple lines into csv single cell - also need data merge

:confused:Hello -- i just joined the forums. I am a complete noob -- only about 1 week into learning how to program anything... and starting with linux. I am working in Linux terminal. I have a folder with a bunch of txt files. Each file has several lines of html code. I want to combine... (2 Replies)
Discussion started by: jetsetter
2 Replies

8. Linux

Parsing - export html table data as .csv file?

Hi all, Is there any out there have a brilliant idea on how to export html table data as .csv or write to txt file with separated comma and also get the filename of link from every table and put one line per rows each table. Please see the attached html and PNG of what it looks like. ... (7 Replies)
Discussion started by: lxdorney
7 Replies

9. UNIX for Beginners Questions & Answers

Merge cells in all rows of a HTML table dynamically.

Hello All, I have visited many pages in Unix.com and could find out one solution for merging the HTML cells in the 1st row. (Unable to post the complete URL as I should not as per website rules). But, however I try, I couldn't achieve this merging to happen for all other rows of HTML... (17 Replies)
Discussion started by: Mounika
17 Replies

10. Shell Programming and Scripting

Send Data to MySQL Table Columns

I have two scripts, each script reads an individual data file and copies specific lines of data and sends to MySQL table. Only difference is, each script sends data to a separate column on the same DB. I want to use one script to populate DB table and have data look horizontal, with no overlapping.... (3 Replies)
Discussion started by: SysAdminRialto
3 Replies
DBATBL(1)						      General Commands Manual							 DBATBL(1)

NAME
dbatbl - Manage on-disk reference tables for DB-ALLe SYNOPSIS
dbatbl [command] [options] [args...] DESCRIPTION
This tool allows to index and query the tables that are needed for normal functioning of DB-ALLe. dbatbl always requires a non-switch argument, that indicates what is the operation that should be performed: help Print a help summary. help manpage Print this manpage. cat tableid [tableid [...]] Output all the contents of a WMO B table.. grep string Output all the contents of the local B table whose description contains the given string.. expand table-entry [table-entry [...]] Describe a WMO B table entry or expand a WMO D table entry in its components.. expandcode varcode [varcode [...]] Expand the value of a packed variable code. index [options] filename index-id Index the contents of a table file. describe [options] what [values] Invoke the formatter to describe the given values. Supported so far are: "level ltype l1 l2", "trange pind p1 p2". OPTIONS
dbatbl follows the usual GNU command line syntax, with long options starting with two dashes (`-'). Option for command cat -?, --help print an help message -c, --csv output variables in CSV format Option for command grep -?, --help print an help message -c, --csv output variables in CSV format Option for command expand -?, --help print an help message Option for command expandcode -?, --help print an help message Option for command index -?, --help print an help message -t type, --type=type format of the table to index ('b', 'd', 'conv') Option for command describe -?, --help print an help message AUTHOR
dbatbl has been written by Enrico Zini <enrico@enricozini.com> for ARPA Emilia Romagna, Servizio Idrometeorologico. may 16, 2012 DBATBL(1)
All times are GMT -4. The time now is 01:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy