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
elmalias(1)						      General Commands Manual						       elmalias(1)

NAME
elmalias - display and verify elm user and system aliases SYNOPSIS
format[alias-name-list] Remarks The former functionality of the command has been taken over by the command (see newalias(1)). DESCRIPTION
The command displays and verifies user and system aliases. The system database must have been created by the command (see newalias(1)). The user database must have been created by either the com- mand or the mail system (see elm(1)). If the same alias is in both databases, the user version is used. Missing database files are silently ignored. Each database entry can have the following fields, which are described in detail in newalias(1): alias-list A list of one or more aliases for the entry. address-list A list of one or more addresses for the entry. An address can be an alias from another entry's alias-list. comment An optional field containing information about the entry. This field is not included in outbound mail. firstname An optional field interpreted as the first name of the person or group. It is used in fullname. lastname An optional field interpreted as the last name of the person or group. It is used in fullname. fullname A combination value made up from the firstname and lastname fields, in the form: firstname lastname. recognizes three types of alias names: A database entry that has one address in address-list. assumes this address is a valid mailing address. A database entry that has two or more addresses in address-list. assumes initially that these addresses are aliases to or entries. An address in a entry or an alias in alias-name-list that is not an alias in the database. In both cases, the item is reported as both the alias name and its address. With no options or operands, displays the address-list field for each alias in the two databases. If an entry has more than one alias, the address-list field is displayed multiple times. With an alias-name-list and no options, displays the address-list field of each alias name in the list. If an alias name is not found in the databases, it is treated as without comment. Options recognizes the following options: Change the display to alias name followed by address-list field. Turn debugging on. Fully expand aliases. This option can be used only when an alias-name-list is given. If an address in a address list is an alias name, it is replaced by that alias entry. The process is recursive until the results are either or types. If a address is not an alias name, it is reported as both the alias name and the address, with type Duplicate alias names are reported only once. entries are not expanded, even if their addresses are actually aliases. Display the format string for each alias name in the file or in the alias-name-list. The following character pairs are replaced in the format by the corresponding value for each alias. The alias name. The comment field. The lastname field. The fullname value. The alias type: or The address-list field. Change the display to address-list followed by fullname, if any, in parentheses. Report an error if a name in alias-name-list does not correspond to an alias in the database. Display a message for each unknown name and exit with a nonzero status. Use the system alias database only, unless is also specified. Use the user alias database only, unless is also specified. Use a verbose output format. Change the display to alias name, followed by address-list, followed by fullname, if any, in parentheses. Use a very verbose, multiline output format with the following titles, corresponding to the format codes of the option. If a field is empty, the title is omitted. EXIT STATUS
sets the following exit status values: Normal completion. An error occurred. You may have specified: o An invalid option. o The option without an alias-name-list. o The option without a format. o The option with an unknown alias name in alias-name-list. EXAMPLES
Consider a user database that contains the following entries: Since and do not refer to alias entries, they are typed as with no options or operands produces the following output. produces the alias names, address, and full name, as follows: To expand a set of aliases and format them with field titles, use the and options, as in the following command: producing: AUTHOR
was developed by HP. FILES
User alias database data table User alias database directory table User alias database hash table User alias source text System alias database data table System alias database directory table System alias database hash table System alias source text SEE ALSO
elm(1), newalias(1). elmalias(1)
All times are GMT -4. The time now is 09:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy