Make the source code from one code block the input to another code block in Emacs org-mode
I'm getting started with org-mode and there's something I'd like to do that seems like it should be possible, but I'm having trouble figuring out. Let me describe the scenario: I have some SQL code that I want to execute on a remote server. I currently have a python script that takes SQL code as a string and does this for me. Without org-mode, my work flow would be to start with a file like so: echo "SELECT name, grade FROM students" >> basic_query.sql and then I'd run: $ python run_query.py basic_query.sql To do this is in the org-mode setting, I could create a code block for the SQL: #+NAME: