0

I would like to load text from a field in a SQLite table and run it as a SQLite query. All done in a SQLite query. No external string operations, nor command line operations are possible. Pure SQLite only.

Let's say that I would create a table command_table with the rows:

COMMAND_NAME:  COMMAND:
command1        SELECT * FROM table1
command2        SELECT * FROM table1 WHERE table1.row1 = '1'

The desired SQLite command would be able to load the COMMAND and interpret it. The commands would be as complex as it gets, so using some generic comparisons like
WHERE table1.row1 = command_table.command1" is not an option.

Ayo K
  • 1,719
  • 2
  • 22
  • 34

1 Answers1

0

SQLite is designed as an embedded database, i.e., to be used together with a 'real' programming language. Therefore, it does not have any mechanism to execute dynamic SQL statements from within SQL itself.

CL.
  • 173,858
  • 17
  • 217
  • 259