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. So far my database looks like attached image, named sendtodb.png.
I decided to combine two scripts into one (master) script. When I run master script, it only populates data to one column on the DB. I want to send data to two specific columns.
I know exact problem, my script can't distinguish between what data I want to send to what column. I'm using one CSV file that has all the data I need. When I run master script, it reads from CSV file and copies specific lines I need, and sends to DB.
I've been playing around with awk command in hopes it can filter out lines of data I don't need, but so far my grep command copies exact lines I want to send to the DB columns.
My script is below.
My goal is to successfully send data to MySQL table and have the data look horizontal row by row. I also attached CSV file, where script reads from and copies data to sent to the DB.
Thanks ctsgnb, but I used a shorter command to export data to MySQL DB. I decided to use mysqlimport command and it worked. Thanks for taking the time to help.
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... (1 Reply)
I have written a shell script that calls below sql file. It is not sending the query data in table in the body of email.
spool table_update.html;
SELECT * FROM PROCESS_LOG_STATS where process = 'ActivateSubscription';
spool off;
exit;
Please use code tags next time for your code and data.... (9 Replies)
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)
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)
Everybody,
can you tell me how express about this; we have text data file as :
parameter1 Parameter2
AA 55
BB 77
. .
. .
. .
We want to draw table for this data as attached then send as body of Email (4 Replies)
(sorry for my english)
Hi, i have an app that uses MYSQL API C.. i trying do a timeout until the table is locked by an other thread , in the docs of Mysql i can see that MYSQL_OPT_READ_TIMEOUT is not implemented for linux ¿?¿?.. any body knows a way to do a timeout until the table is locked by... (0 Replies)
Hi, iam learning MySql. Iam trieing to create a table in the database "guestbook"
at the command line in mysql heres what i type but i get a error
mysql>create table guestbook
->(
-> name varchar(40) null.
-> url varchar(40) null.
-> comments ... (3 Replies)