SPD Server uses keywords to initiate statements or to refer to syntax elements. In SPD Server
SQL, keywords are treated as reserved words. For example, you can use the words “where”
and “group” only in certain ways because SPD Server uses WHERE and GROUP BY clauses.
You cannot use them for identifiers because this use introduces ambiguity. For example,
select count(*) from sales.receipts where
table='April';
is a valid but ambiguous statement.
If you use a keyword
as an identifier and the request is submitted via explicit SQL pass-through,
the server will return an error and the request will fail. If you
use a keyword as an identifier in an implicit SQL pass-through request,
the request will fail and will not return an error. You must set %let
SPDSIPDB=YES
to see the failure message.
For both implicit and explicit SQL pass-through failures,
the location of the failure is indicated in the failure message with
a # (number sign). For example, in the following message, the # indicates
a parsing error on the keyword MATCH:
SPDS_NOTE: Parse Failure: select TXT_3.Messages from #MATCH TXT_1 inner join ...
In contrast, SAS SQL
allows keywords in some, but not all, syntax locations. SAS SQL also
uses underscores to denote errors.
The following list contains current SPD Server keywords. Some of the words are reserved
for future enhancements to SPD Server SQL.
add |
date |
grant |
missing |
select |
all |
dec |
group |
modify |
set |
alter |
decimal |
gt |
natural |
smallint |
and |
default |
having |
ne |
some |
any |
delete |
in |
no |
table |
as |
desc |
index |
not |
then |
asc |
describe |
indexes |
notin |
to |
async |
dictionary |
informat |
null |
trailing |
begin |
disconnect |
inner |
num |
trim |
between |
distinct |
insert |
numeric |
true |
both |
double |
int |
on |
union |
by |
drop |
integer |
operation |
unique |
calculated |
else |
intersect |
option |
unknown |
cascade |
end |
into |
or |
update |
case |
engname |
is |
order |
upper |
char |
engopt |
join |
outer |
using |
character |
eq |
label |
overlaps |
validate |
column |
except |
le |
partial |
values |
connect |
execute |
leading |
precision |
varchar |
connection |
exists |
left |
privileges |
verbose |
contains |
false |
lib |
public |
view |
contents |
float |
libref |
real |
when |
copy |
for |
like |
references |
where |
corr |
format |
load |
reset |
with |
corresponding |
from |
lower |
restrict |
without |
create |
full |
lt |
revoke |
yes |
cross |
ge |
match |
right |