| Date: | Tue, 19 Oct 2010 16:19:20 -0500 |
| Reply-To: | Craig Johnson <cjohns38@GMAIL.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Craig Johnson <cjohns38@GMAIL.COM> |
| Subject: | PROC SQL Update Question |
| Content-Type: | text/plain; charset=ISO-8859-1 |
|---|
I'm trying to update the values in one table by the values in another
table.
*****************
Where I got the sample code
*****************
http://support.sas.com/documentation/onlinedoc/91pdf/sasdoc_91/base_sqlproc_6992.pdf
PG 153
*****************
My code
*****************
PROC SQL;
UPDATE CALIBRATION_TRANS AS A
SET MaxTrial= ( ( SELECT MAX(CalibrationBlock_Sample)
FROM Split_char_calibrationblock
Group by Subject
) AS B WHERE A.SUBJECT=B.SUBJECT
);
QUIT;
*****************************************************
Right now I keep getting the following error
*****************************************************
ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, ), *,
**, +, -, /, <, <=,
<>, =, >, >=, ?, AND, BETWEEN, CONTAINS, EQ, EQT, GE, GET, GT,
GTT, IN, IS, LE,
LET, LIKE, LT, LTT, NE, NET, NOT, NOTIN, OR, ^, ^=, |, ||, ~,
~=.
ERROR 76-322: Syntax error, statement will be ignored.
What am I doing wrong?
|