Neoview Command Interface (NCI) Guide (R2.3)

To set the application to format output as XML:
SQL>set markup XML
XML formatted error message examples:
SQL>set markup <]]>
<?xml version="1.0"?>
<Results>
<Query>
<![CDATA[set markup <]]&#62; ]]>>
</Query>
<ErrorList>
<Error id="1">
<ErrorCode>UNKNOWN ERROR CODE</ErrorCode <ErrorMessage> <![CDATA[
ERROR: A syntax error occurred at or before:set markup <]]&#62;>
^ ]]<>/ErrorMsg>
</Error> </ErrorList>
</Results>
This command displays CSV like output using the COLSEP value as a separator.
SQL>set colsep |
SQL>set markup colsep
SQL>select * from employee;
32|THOMAS |RUDLOFF |2000|100|138000.40
39|KLAUS |SAFFERT |3200|100|75000.00
89|PETER |SMITH| |3300|300|37000.40
29|JANE |RAYMOND |3000|100|136000.00
65|RACHEL |MCKAY |4000|100|118000.00
75|TIM |WALKER |3000|300|320000.00
11|ROGER |GREEN |9000|100|175500.00
93|DONALD |TAYLOR |3100|300|33000.00
SET PARAM Command
The SET PARAM command associates a parameter name with a parameter value in the current
session. The parameter name and value are associated with one of these parameter types:
Named parameter (represented by ?param-name) in a DML statement or in a prepared
SQL statement
Unnamed parameter (represented by ?) in a prepared SQL statement only
A prepared statement is one that you SQL compile by using the PREPARE statement. For more
information about PREPARE, see the Neoview SQL Reference Manual.
After running SET PARAM commands in the session:
You can specify named parameters (?param-name) in a DML statement.
You can execute a prepared statement with named parameters by using the EXECUTE
statement without a USING clause.
You can execute a prepared statement with unnamed parameters by using the EXECUTE
statement with a USING clause that contains literal values and/or a list of the named
parameters set by SET PARAM.
The EXECUTE statement substitutes parameter values for the parameters in the prepared
statement. For more information about EXECUTE, see the Neoview SQL Reference Manual.
Syntax
SET PARAM param-name param-value
124 NCI Commands