Re: Passing a variable to an sqlite3 code block

2025-07-13 Thread Roger Mason
Hello Ihor, Ihor Radchenko writes: > Roger Mason writes: > >> Substitution history of formula >> Orig: '(org-sbe "dl" (el @2$1)) >> $xyz-> '(org-sbe "dl" (el @2$1)) >> @r$c-> '(org-sbe "dl" (el #("Fe" 0 2 (face org-table fontified t >> $1->'(org-sbe "dl" (el #("Fe" 0 2 (face org-tab

Re: Passing a variable to an sqlite3 code block

2025-07-12 Thread Ihor Radchenko
Roger Mason writes: > Substitution history of formula > Orig: '(org-sbe "dl" (el @2$1)) > $xyz-> '(org-sbe "dl" (el @2$1)) > @r$c-> '(org-sbe "dl" (el #("Fe" 0 2 (face org-table fontified t > $1->'(org-sbe "dl" (el #("Fe" 0 2 (face org-table fontified t > Result: #ERROR I suspect

Re: Passing a variable to an sqlite3 code block

2025-07-01 Thread Roger Mason
Hello, Ihor Radchenko writes: > Roger Mason writes: > >> It does not work when called thus: >> | Element | oxide d.l. | >> |-+-| >> | Fe | #ERROR | >> #+tblfm: @2$2='(org-sbe "dl" (el '@2$1')) >> >> I have tried various ways of quoting the reference to the cell

Re: Passing a variable to an sqlite3 code block

2025-06-29 Thread Ihor Radchenko
Roger Mason writes: > It does not work when called thus: > | Element | oxide d.l. | > |-+-| > | Fe | #ERROR | > #+tblfm: @2$2='(org-sbe "dl" (el '@2$1')) > > I have tried various ways of quoting the reference to the cell in column > 1 to no avail. M-x org-table-tog

Passing a variable to an sqlite3 code block

2025-06-28 Thread Roger Mason
Hello, The following code: #+name: dl #+begin_src sqlite :db 250602.db :var el="Fe" select 3*(select avg(s_b) from bremen_$el)/(select I_std from wds_elements where Element='$el') * (select mass from wds_elements where Element='$el'); #+end_src works as desired when called from a table like t