HP (Hewlett-Packard) 544530-001 Computer Accessories User Manual


 
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 133).
See “Perl and Python Commands on Windows” (page 75) and “Perl and Python Commands on
Linux or UNIX” (page 75).
Perl and Python Commands on Windows
In these examples, hpnvs-installation-directory is the directory where you installed
the Neoview Script software files. For more information, see Table 2-1 (page 34).
On the Perl command line, enter:
cd hpnvs-installation-directory\nvscript\bin
perl hpnvs.pl "sql-statement-string"
For example:
>cd install\nvscript\bin
>perl hpnvs.pl "POPULATE INDEX neo.persnl.xempname
>ON neo.persnl.employee"
On the Python command line, enter:
cd hpnvs-installation-directory\nvscript\bin
python hpnvs.py "sql-statement-string"
For example:
>cd install\nvscript\bin
>python hpnvs.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, hpnvs-installation-directory is the directory where you installed
the Neoview Script software files. For more information, see Table 2-1 (page 34).
On the Perl command line, enter:
cd hpnvs-installation-directory/nvscript/bin
perl hpnvs.pl "sql-statement-string"
Launching Neoview Script From the Perl or Python Command Line 75