emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* send the content of one column of a table to another table
@ 2018-04-10 10:24 Uwe Brauer
  2018-04-10 12:13 ` [SOLVED aggregate] (was: send the content of one column of a table to another table) Uwe Brauer
  0 siblings, 1 reply; 2+ messages in thread
From: Uwe Brauer @ 2018-04-10 10:24 UTC (permalink / raw)
  To: emacs-orgmode

Hi

I want to do something simple, just sending (pushing) a column of 
one table to another column of another table. I know about 
orgtbl-join but I can't get it to work, besides I don't need all 
its sophistication.

So I have
 
#+tblname: master | type     | Fiber | Sugar | Protein | Carb | 
type | |----------+-------+-------+---------+------+------| | 
eggplant |   2.5 |   3.2 |     0.8 |  8.6 |      | | tomatoe  | 
0.6 |   2.1 |     0.8 |  3.4 |      | | onion    |   1.3 |   4.4 | 
1.3 |  9.0 |      | | egg      |     0 |  18.3 |    31.9 | 18.3 | 
| | rice     |   0.2 |     0 |     1.5 | 16.0 |      | | bread 
|   0.7 |   0.7 |     3.3 | 16.0 |      | | orange   |   3.1 | 
11.9 |     1.3 | 17.6 |      | | banana   |   2.1 |   9.9 | 
0.9 | 18.5 |      | | tofu     |   0.7 |   0.5 |     6.6 |  1.4 | 
| | nut      |   2.6 |   1.3 |     4.9 |  7.2 |      | | corn 
|   4.7 |   1.8 |     2.8 | 21.3 |      |   #+TBLNAME: statistics 
| type    | Protein | |---------+---------| | eggplan |         | 
| tomatoe |         | | onion   |         | | egg     |         | 
| rice    |         | | bread   |         | | orange  |         | 
| banana  |         | | tofu    |         | | nut     |         | 
| corn    |         | 
 
 

So all the time a change the content of the protein column in 
master table I want to send that change to the statistics table. 
How can I achieve that?

Thanks

Uwe Brauer 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [SOLVED aggregate] (was: send the content of one column of a table to another table)
  2018-04-10 10:24 send the content of one column of a table to another table Uwe Brauer
@ 2018-04-10 12:13 ` Uwe Brauer
  0 siblings, 0 replies; 2+ messages in thread
From: Uwe Brauer @ 2018-04-10 12:13 UTC (permalink / raw)
  To: emacs-orgmode

>>> "Uwe" == Uwe Brauer <oub@mat.ucm.es> writes:

   > Hi
   > I want to do something simple, just sending (pushing) a column of 
   > one table to another column of another table. I know about 
   > orgtbl-join but I can't get it to work, besides I don't need all 
   > its sophistication.

Hi

It seems that the following does what I want.


#+begin_example



#+NAME: original
| Day       | Color | Level | Quantity |
|-----------+-------+-------+----------|
| Monday    | Red   |    30 |       11 |
| Monday    | Blue  |    25 |        3 |
| Tuesday   | Red   |    51 |       12 |
| Tuesday   | Red   |    45 |       15 |
| Tuesday   | Blue  |    33 |       18 |
| Wednesday | Red   |    27 |       23 |
| Wednesday | Blue  |    12 |       16 |
| Wednesday | Blue  |    15 |       15 |
| Thursday  | Red   |    39 |       24 |
| Thursday  | Red   |    41 |       29 |
| Thursday  | Red   |    49 |       30 |
| Friday    | Blue  |     7 |        5 |
| Friday    | Blue  |     6 |        8 |
| Friday    | Blue  |    11 |        9 |


#+BEGIN: aggregate :table original :cols "Day Color"
| Day       | Color |
|-----------+-------|
| Monday    | Red   |
| Monday    | Blue  |
| Tuesday   | Red   |
| Tuesday   | Blue  |
| Wednesday | Red   |
| Wednesday | Blue  |
| Thursday  | Red   |
| Friday    | Blue  |
#+END
#+end_example

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-04-10 12:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-10 10:24 send the content of one column of a table to another table Uwe Brauer
2018-04-10 12:13 ` [SOLVED aggregate] (was: send the content of one column of a table to another table) Uwe Brauer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).