08-18-2017
F_Röder
Calcite | Level 5
Member since
11-21-2012
- 5 Posts
- 1 Likes Given
- 0 Solutions
- 0 Likes Received
-
Latest posts by F_Röder
Subject Views Posted 3322 08-17-2017 06:30 AM 3351 08-16-2017 02:56 AM 3353 08-16-2017 02:54 AM 3359 08-16-2017 02:32 AM 3395 08-15-2017 09:57 AM -
Activity Feed for F_Röder
- Liked Re: proc sql md5 and oracle-db for Patrick. 08-17-2017 06:31 AM
- Posted Re: proc sql md5 and oracle-db on SAS Programming. 08-17-2017 06:30 AM
- Posted Re: proc sql md5 and oracle-db on SAS Programming. 08-16-2017 02:56 AM
- Posted Re: proc sql md5 and oracle-db on SAS Programming. 08-16-2017 02:54 AM
- Posted Re: proc sql md5 and oracle-db on SAS Programming. 08-16-2017 02:32 AM
- Posted proc sql md5 and oracle-db on SAS Programming. 08-15-2017 09:57 AM
-
Posts I Liked
Subject Likes Author Latest Post 1
08-17-2017
06:30 AM
Thank you very much for your help. This works great: put(md5(scan(str,2,'/')),$hex32.) as want Also concatenating this with other strings - something like that: 'FIRST_STRING' || put(md5(scan(str,2,'/')),$hex32.) || 'THIRD_STRING' Thank you very much. Best regards Frank
... View more
08-16-2017
02:56 AM
I have forgotten: I think - this is no oracle problem - just a sas problem
... View more
08-16-2017
02:54 AM
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
08-16-2017
02:32 AM
Hello, that´s my target: I have a log file with entries: /User Folders/REAL_USERNAME/Eigener Ordner/documentation.pdf Because of data protection i want to replace the "REAL_NAME" with a MD5-Hash. I have a SAS-Base-Table with the Log-FIle-entries and want to insert this data into an oracle-db. Something like that: insert into .... SELECT '/' || SUBSTR(REPORT,2, findc(REPORT, '/',2)-2) || '/' || md5(SUBSTR(REPORT,findc(REPORT, '/',2)+1,findc(SUBSTR(REPORT,findc(REPORT, '/',2)+2), '/',2))) as key format $hex32. length=16 ||.... from SB0520C.WRSREPORTS s; So i must concanate each part of the string --> but this don´t work. I tried it also with cat - but this also didn´t work and beyond this cat has just a buffer with 200 bytes - and this is to short. How can i make this? Or does someone has a better solution? Thank you very much Best regards Frank
... View more
08-15-2017
09:57 AM
Hello, i have a SAS-BASE table and want to insert the data into an oracle database. One value should be replaced with a MD5-Hash. This works: PROC SQL; 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 result looks correct - like a hash-value. But i must concanate the result: PROC SQL; SELECT 'BEGINN' || md5(SUBSTR(s.path,findc(s.path, '/',2)+1,findc(SUBSTR(s.path,findc(s.path, '/',2)+2), '/',2))) as key format $hex32. || 'ENDING' from SB0520C.WRSREPORTS s; run; But i get the error: md5(SUBSTR(REPORT,findc(REPORT, '/',2)+1,findc(SUBSTR(REPORT,findc(REPORT, '/',2)+2), '/',2))) as key format $hex32. __ __ 73 22 76 60 ! length=16 || ERROR 73-322: Erwartet wird END. ERROR 22-322: Syntaxfehler, erwartet wird eines der folgenden: eine Zeichenkette in Hochkommata, ',', AS, FORMAT, FROM, INFORMAT, INTO, LABEL, LEN, LENGTH, TRANSCODE. ERROR 76-322: Syntaxfehler, Anweisung wird ignoriert. I tried it with cat - but cat has only a buffer with 200 - and the string is longer. How can i make this? Thank you very much Best regards Frank
... View more