ODBC Server Reference Manual

Transact-SQL Language
HP NonStop ODBC Server Reference Manual429151-002
4-90
NonStop ODBC Server Compared With
NonStop SQL/MP
INTO Clause
In programs used with the NonStop ODBC Server, you cannot specify the SQL Server
INTO clause with the SELECT statement. You can, however, sometimes achieve the
same results by using an INSERT statement with a subquery.
For example, the following statements are used with the NonStop ODBC Server. They
insert a new table, MY_DIVISION, and obtain data for the new table from an existing
table, EMPLOYEE:
create table my_division
(empnum smallint
first_name char(15),
last_name char(20),
jobcode smallint,
deptnum smallint,
salary float null)
insert into my_division
(empnum, first_name, last_name, jobcode, deptnum, salary)
select empnum, first_name, last_name, jobcode,
deptnum, salary
from employee
where jobcode > 500 and deptnum <= 3000
In a program used with SQL Server, you could achieve the results of the previous
statement by using an INTO clause in a SELECT statement:
select jobcode, deptnum, first_name, last_name, salary
into my_division
from persnl.employee
where jobcode > 500 and deptnum <= 3000
NonStop ODBC Server Compared With NonStop SQL/MP
The corresponding NonStop SQL/MP statement is SELECT.
Are vector aggregates
available?
Yes No
Can nonaggregate and
aggregate expressions
be mixed in the
select-list ?
Yes No
Can the select-list
be an asterisk (*)?
No Yes
Feature In SQL Server
In Programs Used With the
NonStop ODBC Server