Neoview Command Interface (NCI) Guide (R2.3)
You can pass only one SQL statement at a time on the Perl or Python command line. The SQL
statement must:
• Be enclosed in double quotes (") without the SQL terminator (;)
• Contain fully qualified database object names (for example, neo.schema-name.obj-name)
• Contain the syntax of one of the supported SQL statements. See Appendix B (page 155).
See “Perl and Python Commands on Windows” (page 85) and “Perl and Python Commands on
Linux or UNIX” (page 85).
Perl and Python Commands on Windows
In these examples, hpnci-installation-directory is the directory where you installed
the NCI software files. For more information, see Table 2-1 (page 41).
• On the Perl command line, enter:
cd hpnci-installation-directory\Neoview Command Interface\bin
perl hpnci.pl "sql-statement-string"
For example:
>cd install\Neoview Command Interface\bin
>perl hpnci.pl "POPULATE INDEX neo.persnl.xempname
>ON neo.persnl.employee"
• On the Python command line, enter:
cd hpnci-installation-directory\Neoview Command Interface\bin
python hpnci.py "sql-statement-string"
For example:
>cd install\Neoview Command Interface\bin
>python hpnci.py "SELECT * FROM neo.persnl.employee"
The command returns this output:
EMPNUM FIRST_NAME LAST_NAME DEPTNUM JOBCODE SALARY
------ --------------- -------------- ------- ------- --------
1 ROGER GREEN 9000 100 175500.00
23 JERRY HOWARD 1000 100 137000.10
29 JANE RAYMOND 3000 100 136000.00
32 THOMAS RUDLOFF 2000 100 138000.40
...
--- 61 row(s) selected.
Perl and Python Commands on Linux or UNIX
In these examples, hpnci-installation-directory is the directory where you installed
the NCI software files. For more information, see Table 2-1 (page 41).
• On the Perl command line, enter:
cd hpnci-installation-directory/nci/bin
perl hpnci.pl "sql-statement-string"
For example:
>cd /usr/local/hp/nci/bin
>perl hpnci.pl "POPULATE INDEX neo.persnl.xempname
>ON neo.persnl.employee"
• On the Python command line, enter:
cd hpnci-installation-directory/nci/bin
python hpnci.py "sql-statement-string"
For example:
>cd /usr/local/hp/nci/bin
>python hpnci.py "SELECT * FROM neo.persnl.employee"
Launching NCI From the Perl or Python Command Line 85