Simple Script (Hello) Sample (SQL-file technology)

The sample consists of 13 files of following types (extensions): SQL, CMD, TXT, one of the files is without the extension: "%simple_script%";
it is so-called SQL microscript, is included by “:r”-directive as a head of "simple_script.sql", which is here a main SQL-script.
The files are dependent one from the other. So indeed this simple script is not trivial, several features are gathered in it.
The first of three T-SQL batches, portions of instructions continuing to GO-separator (but not including it), do following:

The first batch is in "%simple_script%" file, it prints report header as text message: *** SIMPLE SCRIPT (<date and time>): ***.
The other two batches are in "simple_script.sql".

The second batch produces five primitive result sets, they are:
1. General greeting (message);
2. Extended greeting, in Russian;
3. $(str_UnicodeString)-property value (from SQL-project settings) that are letters from modern Greek alphabet (24 capitals);
4. SQLAUX system variables (output of three names-values is performed): is_sqlaux_imported, sql_translation_timestamp_aux, sql_settings_script_aux;
5. sql_translation_dir_aux variable view (file translation folder path, is ended with backslash).

The third batch prints output termination decorator: — — — (three m-dashes through the space character).
That’s all (this is a simple script).

The result is saved into "simple_script.txt", or may be seen as translation output in console window or in SSMS
(it depends on how to invoke the script).
There are no subdirectories in this SQL-project.

=== PURPOSES OF CONNECTED SAMPLE FILES (SQL-PROJECT): ===
1. "!ReadMe.txt" — simple explanation of sample program intentions, this file;
2. "$ide_root.sql" — it is intended for SSMS.cmd to designate project root folder for the IDE;
3. "$sql_settings.cmd" —
      predefined settings batch name, is activated by $SQLTRANS,
      it attaches SQLAUX import definitions and project definitions from "@simple_script.cmd" (conventional name);
4. "$sql_settings.sql.bak" —
      alternative way for specification of SQL-settings (it is not compatible with SSMS,
      that is why it’s not recommended), "$sql_settings.sql" is inserted at the beginning of any SQL-translation (automatically by the $SQLTRANS),
      if it is not blocked by $sql_settings_script variable (hyphen value '-' in the SQLAUX) or if it is referenced in "$sql_settings.cmd"
      (via $sql_settings_script variable);
5. "%simple_script%" —
      this microscript is included in the first line of "simple_script.sql" (:r "%simple_script%"),
      its purpose is to print a caption of the report;
6. "@simple_script.cmd" —
      project definitions, SQL-settings in the project root, imported by "$sql_settings.cmd"
      (some of them may be overridden in subfolders if they are), this is conventional name for SQL-settings non-trivial configuration in UTF-8
      (text content is stored without signature, i.e. no BOM-prefix, but CmdCpAuto plugin for Far Manager “understands” the special filename);
7. "exec_no_confirm.cmd" —
      as opposed to "simple_script.cmd" which is in a normal mode,
      this command (batch-file) avoids involving of user confirmation step (there is nothing unsafe in "simple_script.sql"),
      SQL-output goes to the console;
8. "exec_simple_script.cmd" — normal execution with SQL-output (result print) to the console;
9. "run_simple_script.cmd" — minimal example of so-called complex command (SQL-output goes to the console);
10. "simple_script.cmd" —
      the most natural command form for saving SQL-ouput to corresponding TXT-report,
      with obligatory user confirmation (in general SQL-script may be dangerous for the database);
11. "simple_script.sql" — main SQL-script producing compound report;
12. "simple_script.txt" — TXT-report (SQL-output as result of "simple_script.sql" execution);
13. "SSMS.cmd" —
      so-called IDE-starter, it prepares SQL-project environment (SQL-settings as environment variables) and launches the IDE process (Ssms.exe),
      "$ide_root.sql" is then opened in SQL Server Management Studio (at that moment as single SQL-file tab).

— — —