Wow - very fast:) the select of post 1 works . It is just a select from a sas-base-table. The HASH-value looks correct. The i try the insert into an oracle-db: PROC SQL; INSERT INTO oraSY052.STF_LFA_I_LOGFILE_2016 (REPORT_PATH) SELECT md5(SUBSTR(s.path,findc(s.path, '/',2)+1,findc(SUBSTR(s.path,findc(s.path, '/',2)+2), '/',2))) as key format $hex32. from SB0520C.WRSREPORTS s; run; The inserted values don´t look correct ( itried it also without "as key format $hex32."): “ââ!³LÙÏPÉ¿_‰ ÿŒé8Ž]eºEéš\ÏÒˆ So the INSERT concerts the data and make it corrupt --> that´s the first problem. But in my real project i have a case-query in the select-statement and must concanate the md5-value with some other strings (this is an example without concanating the string): INSERT INTO &_INPUT. (REPORTNAME, REPORT_PATH, SASSESSION, DESCRIPTION, CODE, SESSIONS, USERID, STAND_DATUM_ZEIT, STAND_DATUM, LAST_UPDATE) SELECT substr(REPORT,findc(REPORT, '/', "B") + 1), CASE SUBSTR(REPORT,2, findc(SUBSTR(REPORT,2), '/')-1) WHEN 'User Folders' THEN md5(SUBSTR(s.path,findc(s.path, '/',2)+1,findc(SUBSTR(s.path,findc(s.path, '/',2)+2), '/',2))) as key format $hex32. ELSE REPORT END AS REPORT_PATH, SASSESSION, DESCRIPTION,...... Here i get the errors: Zeile 4.308: ERROR 73-322: Erwartet wird END. Zeile 4.310: ERROR 22-322: Syntaxfehler, erwartet wird eines der folgenden: eine Zeichenkette in Hochkommata, ',', AS, FORMAT, FROM, INFORMAT, INTO, LABEL, LEN, LENGTH, TRANSCODE. Zeile 4.310: ERROR 202-322: The option or parameter is not recognized and will be ignored. Zeile 4.319: ERROR 79-322: Erwartet wird ')'. Zeile 4.319: ERROR 76-322: Syntaxfehler, Anweisung wird ignoriert. Thank you very much
... View more