-
Notifications
You must be signed in to change notification settings - Fork 9
/
basic.sas
39 lines (38 loc) · 885 Bytes
/
basic.sas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
data transform;
id = 42;
val = 'Hello world';
output;
run;
proc sql feedback;
select
t.*
from
transform t
where
val ? '?' /* ? is expanded to 'contains' */
& /* & is expanded to 'and' */
val gt 'gt' /* gt is expanded to '>' */
| /* | is expanded to '|' */
val lt 'lt' /* lt is expanded to '<' */
! /* ! is expanded to 'or' */
val eq 'eq' /* eq is expanded to '=' */
;
/* After expansion, the statement becomes (after
manually reformatting it a bit)
select
T.id,
T.val
from
WORK.TRANSFORM T
where
(
T.val contains '?' and
( T.val > 'gt')
) or
( T.val < 'lt'
) or (
(T.val = 'eq') and
(T.val eqt 'eqt')
);
*/
quit;