Looking to join three files and then transpose some columns from multiple rows into a single row.
FIRST FILE (FOOD_DES.txt)
Matches to Second File by first field of each
SECOND FILE (NUT_DATA.txt)
Matches to Third File by Second Field of Second File to First Field of Third File
THIRD FILE (NUTR_DEF.txt)
DESIRED OUTPUT (only going to put together the first two as an example)
EXPLANATION OF DESIRED OUTPUT
Hope you have fun with this one...
---------- Post updated at 01:21 PM ---------- Previous update was at 01:11 PM ----------
I have this data in a MySQL database. Ideally I'd like to have this as a view, but I'm not very good with SQL and I have no idea how to do the transpose portion of this merge.
Anyway if you're interested in working this out in sql I will include a script to create the tables and import the data.
Hi all,
I am developing an application in Tcl, inwhich i have to load many modules written in C. I am converting those C modules into shared object(.so) files, and wrap it with my application using SWIG, for which i had the interface file.
Now my question is, i have two different... (2 Replies)
Hello all,
I have a shell script that uses multiple .sql files. These .sql files mainly contain Oracle SQL queries to pull fields from the database. I want to place all the contents of these .sql files in one .sql file and have some parameter sent based on which the respective block or query... (6 Replies)
Hi
I have multiple files each with two columns and I need to combine all those file into a tab delimited file. (multiple entry with same name separated by a comma)
The content of the files are as follows:
---
file1.txt:
name var1
aaa xx
aaa gg
bbb yy
ddd zz
---
file2.txt
... (8 Replies)
Hi All,
How can I merge 3rd column of multiple files into 1 file, the column header in the merged file being the name of the file from which the 3rd column was taken. The first 2 columns of all the files are exactly same.
Thanks for your help ! (3 Replies)
Hello Everyone!
I am new on this forum and this is my first post. I wish to apologize for my, not canonical, English.
I would like to solve this problem but I have no clue of how do it!I will be grateful if someone could help me!
I have a table like this:
gene TF1 TF2 TF3 TF4
gene1 1 2 3 4... (5 Replies)
Hi all, I've searched the web for a long time trying to figure out how to merge columns from multiple files.
I know paste will append columns like so:
paste file1 file2 file3 file4 file5 ...
But this becomes inconvenient when you want to append a large number of files into a single file.
... (2 Replies)
Hi All,
I am trying to merge all the text files into one file using below snippet
cat /home/Temp/Test/Log/*.txt >> all.txt
But it seems it is not working.
I have multiple files like Output_ServerName1.txt, Output_ServreName2.txt
I want to merge each file into one single file and... (6 Replies)
Hello and Good day
I have a lot of files with same number of rows and columns.$2 and $3 are the same in all files .
I need to merge $2,$3,$6 from first file and $6 from another files.
File1:
$1 $2 $3 $4 $5 $6... (8 Replies)
Hi all,
Say i have multiple files x1 x2 x3 x4, all with common header (date, time, year, age),,
How can I merge them to one singe file "X" in shell scripting
Thanks for your suggestions. (2 Replies)
Hi all
I have written some code to write my output in html.
As i have multiple servers, need to generate single html file. but my code is generating html file for each server.
I have merged the files using below code.
cat /home/*_FinalData.html > /home/MergedFinalData.html
But how to... (1 Reply)