About EasyMorph Tutorials & Examples Web-help

Reading and executing SQL from a file


Sometimes it might be necessary to read an arbitrary SQL query from a file and execute it. Here is an example that does the following:

  • Read query from a file (specified by a parameter)
  • Send the query to a sub-project
  • The sub-project executes the query and exports the result into a text file (also specified by a parameter)

Unpack the example and run export-data.morph in EasyMorph. When executed successfully it should create a text file named “export.csv” in the project folder.

export-data.zip (241.4 KB)