Neoview Command Interface (NCI) Guide (R2.5)
^ ]]<>/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
param-name
is the name of the parameter for which a value is specified. Parameter names are case-sensitive.
For example, the parameter ?pn is not equivalent to the parameter ?PN. param-name can
be preceded by a question mark (?), such as ?param-name.
param-value
is a numeric or character literal that specifies the value for the parameter. If you do not specify
a value, NCI returns an error.
If param-value is a character literal and the target column type is a character string, you do
not have to enclose the value in single quotation marks. Its data type is determined from the
data type of the column to which the literal is assigned. Character strings specified as
parameter values are always case-sensitive even if they are not enclosed in quotation marks.
SET PARAM Command 117