1
Programming / Re: [Classic Rexx] How can one pipe data to application?
« on: June 12, 2025, 09:51:41 pm »sqlite3 seems to use special syntax
Yes, it is somewhat special, but also useful once one find out that the character ; (semicolon) is important.
In the below example one load the database (en2sv.db3) at start by specifying the name as parameter to sqlite3
Then one can input a command that begin with a . (dot) or SQL query.
The enter key just add a new line, while ; & Enter instruct sqlite3 to process what has been entered on the lines above since previous instruction.
Code: [Select]
OS/2 Command Interpreter version 4.5
[D:\PROGRAMS\DRDIALOG\WRD2NLV]sqlite3 en2sv.db3
SQLite version 3.28.0 2019-04-16 19:49:53
Enter ".help" for usage hints.
sqlite> SELECT
...> *
...> FROM
...> CLASSIFICATION
...> LIMIT 3;
1||Substantiv|152
2||Adjektiv|152
3||Räkneord|152
sqlite>
National characters such as ä above appear as UTF-8 characters and not as ä in codepage 850.The SELECT could have been entered on one line as well, but this illustrate that it is possible to build complex queries over severeal lines.
Read more on https://sqlite.org/index.html and for the vio/cli command line tool https://sqlite.org/cli.html while the gui tool ported by TeLLie provide a more friendly user experience.