SQL - SAP HANA - REPLACE_REGEXPR in Column table











up vote
0
down vote

favorite












I have some tables on SAP HANA and „create column table“ to combine multiple „raw tables“ and need to replace strings from one column in the newly created table. Tablename “Testsubject_status” Column name “STATUS”.
The reason why I need to replace the strings, is to get a harmonized wording on specific entries.
With the following example, it is hopefully more clear what I mean:



Table name: Testsubject_status --- Column: Status




  • Test me

  • Test him

  • Test with the ID 1237 is done

  • Test her

  • Test with the ID 928162 is done

  • Test with the ID 991 is done


The result should be



Table name: Testsubject_status --- Column: Status




  • Test me

  • Test him

  • Test is done

  • Test her

  • Test is done

  • Test is done


I tried the following:



CREATE COLUMN TABLE SCHEMATTT.Testsubject_status AS (
Select
Table1.Person AS “Person”,
Table1.Vers AS “Vers”,
Table2.Flnr AS “Flnr”,
Table3.Status AS “Status”
FROM
SCHEMATTT.Table1, SCHEMATTT.Table2, SCHEMATTT.Table3
WHERE SCHEMATTT.Table1.Person = SCHEMATTT.Table2.Person
AND SCHEMATTT.Table2.Flnr = SCHEMATTT.Table3.Flnr


SELECT
REPLACE_REGEXPR (‘with the id d{1,}’ IN ‘TEST with %’ WITH ‘’) “replace_regexpr”
FROM SCHEMATTT.Testsubject_status
);


Creating the table is working. The Replace_Regexpr statement is only working if I do not run it together with the create column table statement and then only creates a table with one column and the entries ‘TEST with %’ in every row.



Additional info:




  • There is not only the “Test is done” string that needs to be harmonized, but a few others as well. So I need to use the replace statement more than once in this specific column “Status”

  • The "Test is done" Statement is not 1:1 with another Statement in the table, so the other statements can't be used in any way to do this :-)


Not sure if creating the table in this way is the best one, but I guess that’s another story 



Thank you in advance for your input!



This Picture is for clarification in the comments:
Status Entries and desired modification










share|improve this question




























    up vote
    0
    down vote

    favorite












    I have some tables on SAP HANA and „create column table“ to combine multiple „raw tables“ and need to replace strings from one column in the newly created table. Tablename “Testsubject_status” Column name “STATUS”.
    The reason why I need to replace the strings, is to get a harmonized wording on specific entries.
    With the following example, it is hopefully more clear what I mean:



    Table name: Testsubject_status --- Column: Status




    • Test me

    • Test him

    • Test with the ID 1237 is done

    • Test her

    • Test with the ID 928162 is done

    • Test with the ID 991 is done


    The result should be



    Table name: Testsubject_status --- Column: Status




    • Test me

    • Test him

    • Test is done

    • Test her

    • Test is done

    • Test is done


    I tried the following:



    CREATE COLUMN TABLE SCHEMATTT.Testsubject_status AS (
    Select
    Table1.Person AS “Person”,
    Table1.Vers AS “Vers”,
    Table2.Flnr AS “Flnr”,
    Table3.Status AS “Status”
    FROM
    SCHEMATTT.Table1, SCHEMATTT.Table2, SCHEMATTT.Table3
    WHERE SCHEMATTT.Table1.Person = SCHEMATTT.Table2.Person
    AND SCHEMATTT.Table2.Flnr = SCHEMATTT.Table3.Flnr


    SELECT
    REPLACE_REGEXPR (‘with the id d{1,}’ IN ‘TEST with %’ WITH ‘’) “replace_regexpr”
    FROM SCHEMATTT.Testsubject_status
    );


    Creating the table is working. The Replace_Regexpr statement is only working if I do not run it together with the create column table statement and then only creates a table with one column and the entries ‘TEST with %’ in every row.



    Additional info:




    • There is not only the “Test is done” string that needs to be harmonized, but a few others as well. So I need to use the replace statement more than once in this specific column “Status”

    • The "Test is done" Statement is not 1:1 with another Statement in the table, so the other statements can't be used in any way to do this :-)


    Not sure if creating the table in this way is the best one, but I guess that’s another story 



    Thank you in advance for your input!



    This Picture is for clarification in the comments:
    Status Entries and desired modification










    share|improve this question


























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have some tables on SAP HANA and „create column table“ to combine multiple „raw tables“ and need to replace strings from one column in the newly created table. Tablename “Testsubject_status” Column name “STATUS”.
      The reason why I need to replace the strings, is to get a harmonized wording on specific entries.
      With the following example, it is hopefully more clear what I mean:



      Table name: Testsubject_status --- Column: Status




      • Test me

      • Test him

      • Test with the ID 1237 is done

      • Test her

      • Test with the ID 928162 is done

      • Test with the ID 991 is done


      The result should be



      Table name: Testsubject_status --- Column: Status




      • Test me

      • Test him

      • Test is done

      • Test her

      • Test is done

      • Test is done


      I tried the following:



      CREATE COLUMN TABLE SCHEMATTT.Testsubject_status AS (
      Select
      Table1.Person AS “Person”,
      Table1.Vers AS “Vers”,
      Table2.Flnr AS “Flnr”,
      Table3.Status AS “Status”
      FROM
      SCHEMATTT.Table1, SCHEMATTT.Table2, SCHEMATTT.Table3
      WHERE SCHEMATTT.Table1.Person = SCHEMATTT.Table2.Person
      AND SCHEMATTT.Table2.Flnr = SCHEMATTT.Table3.Flnr


      SELECT
      REPLACE_REGEXPR (‘with the id d{1,}’ IN ‘TEST with %’ WITH ‘’) “replace_regexpr”
      FROM SCHEMATTT.Testsubject_status
      );


      Creating the table is working. The Replace_Regexpr statement is only working if I do not run it together with the create column table statement and then only creates a table with one column and the entries ‘TEST with %’ in every row.



      Additional info:




      • There is not only the “Test is done” string that needs to be harmonized, but a few others as well. So I need to use the replace statement more than once in this specific column “Status”

      • The "Test is done" Statement is not 1:1 with another Statement in the table, so the other statements can't be used in any way to do this :-)


      Not sure if creating the table in this way is the best one, but I guess that’s another story 



      Thank you in advance for your input!



      This Picture is for clarification in the comments:
      Status Entries and desired modification










      share|improve this question















      I have some tables on SAP HANA and „create column table“ to combine multiple „raw tables“ and need to replace strings from one column in the newly created table. Tablename “Testsubject_status” Column name “STATUS”.
      The reason why I need to replace the strings, is to get a harmonized wording on specific entries.
      With the following example, it is hopefully more clear what I mean:



      Table name: Testsubject_status --- Column: Status




      • Test me

      • Test him

      • Test with the ID 1237 is done

      • Test her

      • Test with the ID 928162 is done

      • Test with the ID 991 is done


      The result should be



      Table name: Testsubject_status --- Column: Status




      • Test me

      • Test him

      • Test is done

      • Test her

      • Test is done

      • Test is done


      I tried the following:



      CREATE COLUMN TABLE SCHEMATTT.Testsubject_status AS (
      Select
      Table1.Person AS “Person”,
      Table1.Vers AS “Vers”,
      Table2.Flnr AS “Flnr”,
      Table3.Status AS “Status”
      FROM
      SCHEMATTT.Table1, SCHEMATTT.Table2, SCHEMATTT.Table3
      WHERE SCHEMATTT.Table1.Person = SCHEMATTT.Table2.Person
      AND SCHEMATTT.Table2.Flnr = SCHEMATTT.Table3.Flnr


      SELECT
      REPLACE_REGEXPR (‘with the id d{1,}’ IN ‘TEST with %’ WITH ‘’) “replace_regexpr”
      FROM SCHEMATTT.Testsubject_status
      );


      Creating the table is working. The Replace_Regexpr statement is only working if I do not run it together with the create column table statement and then only creates a table with one column and the entries ‘TEST with %’ in every row.



      Additional info:




      • There is not only the “Test is done” string that needs to be harmonized, but a few others as well. So I need to use the replace statement more than once in this specific column “Status”

      • The "Test is done" Statement is not 1:1 with another Statement in the table, so the other statements can't be used in any way to do this :-)


      Not sure if creating the table in this way is the best one, but I guess that’s another story 



      Thank you in advance for your input!



      This Picture is for clarification in the comments:
      Status Entries and desired modification







      sql sap hana






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 13 at 12:37

























      asked Nov 12 at 10:22









      Mike B

      145




      145
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          @Mike, could you please try following SQLScript command



          CREATE COLUMN TABLE Testsubject_status2 AS (
          Select
          Table1.Person AS "Person",
          Table1.Vers AS "Vers",
          Table2.Flnr AS "Flnr",
          Table3.Status AS "Status",
          REPLACE_REGEXPR ('test with the id [[:digit:]]* is done' FLAG 'i' IN Table3.STATUS WITH 'Test is done') "replace_regexpr"
          FROM
          Table1, Table2, Table3
          WHERE Table1.Person = Table2.Person
          AND Table2.Flnr = Table3.Flnr
          );


          This will produce a table with following sample data



          enter image description here



          Note that the STATUS column is replaced with a static text if there is a match for the given condition. Else the STATUS text is kept as it is



          For the additional info, I added following expressions but I did not like it much
          Maybe there are better solutions



          REPLACE_REGEXPR (
          '(test with the id|Deployment for the ID) [[:digit:]]* is (done|completed)'
          FLAG 'i'
          IN Table3.STATUS
          WITH
          case
          when Table3.STATUS LIKE_REGEXPR('test') Flag 'i' then 'test is done'
          when Table3.STATUS LIKE_REGEXPR('deploy') Flag 'i' then 'deployment is done'
          else Table3.STATUS
          end
          ) as "replace_regexpr_ext"


          You can add this add a new calculated column in your table definitions script



          I assume you have following status text in your table data:




          • Deployment for the ID 234 is completed

          • Deploy development






          share|improve this answer























          • Thank you very much Eralper, really! The Statement is finally working! As stated in the "additional Info" part of my post, I would need to replace other Strings like the "Test is done“ as well. If I put the REPLACE_REGEXPR Statement in a CASE WHEN Table3.Status like ‘test with the ID % is done’ then REPLACE_REGEXPR ('test with the id [[:digit:]]* is done' FLAG 'i' IN Table3.STATUS WITH 'Test is done') "replace_regexpr" ELSE WHEN xxxxx ELSE WHEN xxx ELSE Table3.STATUS end as replace_regexpr FROM Table3 I get a Syntax is incorrect near """ error message. Do you know what the Problem could be?
            – Mike B
            Nov 13 at 9:05










          • I added a new expressions that you can use as a seperate column data in your code, I hope it helps
            – Eralper
            Nov 13 at 11:16










          • Again, thank you very much Eralper, Maybe I was not clear enough with my wording About the different Status entries. The do not only have this pattern like you assumed. Just to Name a few: Test [[with the ID 1237]] is done, Ticketnumber[[: 9G62J]], [[OE_1559C: ]]New RSKT.... in these examples the part that needs to be removed is marked in [] …. sorry for the missunderstanding and thanks again for your patients and help! Edit: I have about 20 different wordings that need to be harmonized
            – Mike B
            Nov 13 at 11:26












          • And as a result what do you want to see in the output? You can use " | " pipe sign to search for static text in status, but if you want to modify the output then maybe we should use place holders
            – Eralper
            Nov 13 at 11:59










          • Test [[with the ID 1237]] is done should be Test is done - Ticketnumber:9G62J should be Ticketnumber - OE_1559C: New RSKT should be New RSKT
            – Mike B
            Nov 13 at 12:09











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53260132%2fsql-sap-hana-replace-regexpr-in-column-table%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote



          accepted










          @Mike, could you please try following SQLScript command



          CREATE COLUMN TABLE Testsubject_status2 AS (
          Select
          Table1.Person AS "Person",
          Table1.Vers AS "Vers",
          Table2.Flnr AS "Flnr",
          Table3.Status AS "Status",
          REPLACE_REGEXPR ('test with the id [[:digit:]]* is done' FLAG 'i' IN Table3.STATUS WITH 'Test is done') "replace_regexpr"
          FROM
          Table1, Table2, Table3
          WHERE Table1.Person = Table2.Person
          AND Table2.Flnr = Table3.Flnr
          );


          This will produce a table with following sample data



          enter image description here



          Note that the STATUS column is replaced with a static text if there is a match for the given condition. Else the STATUS text is kept as it is



          For the additional info, I added following expressions but I did not like it much
          Maybe there are better solutions



          REPLACE_REGEXPR (
          '(test with the id|Deployment for the ID) [[:digit:]]* is (done|completed)'
          FLAG 'i'
          IN Table3.STATUS
          WITH
          case
          when Table3.STATUS LIKE_REGEXPR('test') Flag 'i' then 'test is done'
          when Table3.STATUS LIKE_REGEXPR('deploy') Flag 'i' then 'deployment is done'
          else Table3.STATUS
          end
          ) as "replace_regexpr_ext"


          You can add this add a new calculated column in your table definitions script



          I assume you have following status text in your table data:




          • Deployment for the ID 234 is completed

          • Deploy development






          share|improve this answer























          • Thank you very much Eralper, really! The Statement is finally working! As stated in the "additional Info" part of my post, I would need to replace other Strings like the "Test is done“ as well. If I put the REPLACE_REGEXPR Statement in a CASE WHEN Table3.Status like ‘test with the ID % is done’ then REPLACE_REGEXPR ('test with the id [[:digit:]]* is done' FLAG 'i' IN Table3.STATUS WITH 'Test is done') "replace_regexpr" ELSE WHEN xxxxx ELSE WHEN xxx ELSE Table3.STATUS end as replace_regexpr FROM Table3 I get a Syntax is incorrect near """ error message. Do you know what the Problem could be?
            – Mike B
            Nov 13 at 9:05










          • I added a new expressions that you can use as a seperate column data in your code, I hope it helps
            – Eralper
            Nov 13 at 11:16










          • Again, thank you very much Eralper, Maybe I was not clear enough with my wording About the different Status entries. The do not only have this pattern like you assumed. Just to Name a few: Test [[with the ID 1237]] is done, Ticketnumber[[: 9G62J]], [[OE_1559C: ]]New RSKT.... in these examples the part that needs to be removed is marked in [] …. sorry for the missunderstanding and thanks again for your patients and help! Edit: I have about 20 different wordings that need to be harmonized
            – Mike B
            Nov 13 at 11:26












          • And as a result what do you want to see in the output? You can use " | " pipe sign to search for static text in status, but if you want to modify the output then maybe we should use place holders
            – Eralper
            Nov 13 at 11:59










          • Test [[with the ID 1237]] is done should be Test is done - Ticketnumber:9G62J should be Ticketnumber - OE_1559C: New RSKT should be New RSKT
            – Mike B
            Nov 13 at 12:09















          up vote
          0
          down vote



          accepted










          @Mike, could you please try following SQLScript command



          CREATE COLUMN TABLE Testsubject_status2 AS (
          Select
          Table1.Person AS "Person",
          Table1.Vers AS "Vers",
          Table2.Flnr AS "Flnr",
          Table3.Status AS "Status",
          REPLACE_REGEXPR ('test with the id [[:digit:]]* is done' FLAG 'i' IN Table3.STATUS WITH 'Test is done') "replace_regexpr"
          FROM
          Table1, Table2, Table3
          WHERE Table1.Person = Table2.Person
          AND Table2.Flnr = Table3.Flnr
          );


          This will produce a table with following sample data



          enter image description here



          Note that the STATUS column is replaced with a static text if there is a match for the given condition. Else the STATUS text is kept as it is



          For the additional info, I added following expressions but I did not like it much
          Maybe there are better solutions



          REPLACE_REGEXPR (
          '(test with the id|Deployment for the ID) [[:digit:]]* is (done|completed)'
          FLAG 'i'
          IN Table3.STATUS
          WITH
          case
          when Table3.STATUS LIKE_REGEXPR('test') Flag 'i' then 'test is done'
          when Table3.STATUS LIKE_REGEXPR('deploy') Flag 'i' then 'deployment is done'
          else Table3.STATUS
          end
          ) as "replace_regexpr_ext"


          You can add this add a new calculated column in your table definitions script



          I assume you have following status text in your table data:




          • Deployment for the ID 234 is completed

          • Deploy development






          share|improve this answer























          • Thank you very much Eralper, really! The Statement is finally working! As stated in the "additional Info" part of my post, I would need to replace other Strings like the "Test is done“ as well. If I put the REPLACE_REGEXPR Statement in a CASE WHEN Table3.Status like ‘test with the ID % is done’ then REPLACE_REGEXPR ('test with the id [[:digit:]]* is done' FLAG 'i' IN Table3.STATUS WITH 'Test is done') "replace_regexpr" ELSE WHEN xxxxx ELSE WHEN xxx ELSE Table3.STATUS end as replace_regexpr FROM Table3 I get a Syntax is incorrect near """ error message. Do you know what the Problem could be?
            – Mike B
            Nov 13 at 9:05










          • I added a new expressions that you can use as a seperate column data in your code, I hope it helps
            – Eralper
            Nov 13 at 11:16










          • Again, thank you very much Eralper, Maybe I was not clear enough with my wording About the different Status entries. The do not only have this pattern like you assumed. Just to Name a few: Test [[with the ID 1237]] is done, Ticketnumber[[: 9G62J]], [[OE_1559C: ]]New RSKT.... in these examples the part that needs to be removed is marked in [] …. sorry for the missunderstanding and thanks again for your patients and help! Edit: I have about 20 different wordings that need to be harmonized
            – Mike B
            Nov 13 at 11:26












          • And as a result what do you want to see in the output? You can use " | " pipe sign to search for static text in status, but if you want to modify the output then maybe we should use place holders
            – Eralper
            Nov 13 at 11:59










          • Test [[with the ID 1237]] is done should be Test is done - Ticketnumber:9G62J should be Ticketnumber - OE_1559C: New RSKT should be New RSKT
            – Mike B
            Nov 13 at 12:09













          up vote
          0
          down vote



          accepted







          up vote
          0
          down vote



          accepted






          @Mike, could you please try following SQLScript command



          CREATE COLUMN TABLE Testsubject_status2 AS (
          Select
          Table1.Person AS "Person",
          Table1.Vers AS "Vers",
          Table2.Flnr AS "Flnr",
          Table3.Status AS "Status",
          REPLACE_REGEXPR ('test with the id [[:digit:]]* is done' FLAG 'i' IN Table3.STATUS WITH 'Test is done') "replace_regexpr"
          FROM
          Table1, Table2, Table3
          WHERE Table1.Person = Table2.Person
          AND Table2.Flnr = Table3.Flnr
          );


          This will produce a table with following sample data



          enter image description here



          Note that the STATUS column is replaced with a static text if there is a match for the given condition. Else the STATUS text is kept as it is



          For the additional info, I added following expressions but I did not like it much
          Maybe there are better solutions



          REPLACE_REGEXPR (
          '(test with the id|Deployment for the ID) [[:digit:]]* is (done|completed)'
          FLAG 'i'
          IN Table3.STATUS
          WITH
          case
          when Table3.STATUS LIKE_REGEXPR('test') Flag 'i' then 'test is done'
          when Table3.STATUS LIKE_REGEXPR('deploy') Flag 'i' then 'deployment is done'
          else Table3.STATUS
          end
          ) as "replace_regexpr_ext"


          You can add this add a new calculated column in your table definitions script



          I assume you have following status text in your table data:




          • Deployment for the ID 234 is completed

          • Deploy development






          share|improve this answer














          @Mike, could you please try following SQLScript command



          CREATE COLUMN TABLE Testsubject_status2 AS (
          Select
          Table1.Person AS "Person",
          Table1.Vers AS "Vers",
          Table2.Flnr AS "Flnr",
          Table3.Status AS "Status",
          REPLACE_REGEXPR ('test with the id [[:digit:]]* is done' FLAG 'i' IN Table3.STATUS WITH 'Test is done') "replace_regexpr"
          FROM
          Table1, Table2, Table3
          WHERE Table1.Person = Table2.Person
          AND Table2.Flnr = Table3.Flnr
          );


          This will produce a table with following sample data



          enter image description here



          Note that the STATUS column is replaced with a static text if there is a match for the given condition. Else the STATUS text is kept as it is



          For the additional info, I added following expressions but I did not like it much
          Maybe there are better solutions



          REPLACE_REGEXPR (
          '(test with the id|Deployment for the ID) [[:digit:]]* is (done|completed)'
          FLAG 'i'
          IN Table3.STATUS
          WITH
          case
          when Table3.STATUS LIKE_REGEXPR('test') Flag 'i' then 'test is done'
          when Table3.STATUS LIKE_REGEXPR('deploy') Flag 'i' then 'deployment is done'
          else Table3.STATUS
          end
          ) as "replace_regexpr_ext"


          You can add this add a new calculated column in your table definitions script



          I assume you have following status text in your table data:




          • Deployment for the ID 234 is completed

          • Deploy development







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 13 at 11:15

























          answered Nov 13 at 6:43









          Eralper

          5,02511220




          5,02511220












          • Thank you very much Eralper, really! The Statement is finally working! As stated in the "additional Info" part of my post, I would need to replace other Strings like the "Test is done“ as well. If I put the REPLACE_REGEXPR Statement in a CASE WHEN Table3.Status like ‘test with the ID % is done’ then REPLACE_REGEXPR ('test with the id [[:digit:]]* is done' FLAG 'i' IN Table3.STATUS WITH 'Test is done') "replace_regexpr" ELSE WHEN xxxxx ELSE WHEN xxx ELSE Table3.STATUS end as replace_regexpr FROM Table3 I get a Syntax is incorrect near """ error message. Do you know what the Problem could be?
            – Mike B
            Nov 13 at 9:05










          • I added a new expressions that you can use as a seperate column data in your code, I hope it helps
            – Eralper
            Nov 13 at 11:16










          • Again, thank you very much Eralper, Maybe I was not clear enough with my wording About the different Status entries. The do not only have this pattern like you assumed. Just to Name a few: Test [[with the ID 1237]] is done, Ticketnumber[[: 9G62J]], [[OE_1559C: ]]New RSKT.... in these examples the part that needs to be removed is marked in [] …. sorry for the missunderstanding and thanks again for your patients and help! Edit: I have about 20 different wordings that need to be harmonized
            – Mike B
            Nov 13 at 11:26












          • And as a result what do you want to see in the output? You can use " | " pipe sign to search for static text in status, but if you want to modify the output then maybe we should use place holders
            – Eralper
            Nov 13 at 11:59










          • Test [[with the ID 1237]] is done should be Test is done - Ticketnumber:9G62J should be Ticketnumber - OE_1559C: New RSKT should be New RSKT
            – Mike B
            Nov 13 at 12:09


















          • Thank you very much Eralper, really! The Statement is finally working! As stated in the "additional Info" part of my post, I would need to replace other Strings like the "Test is done“ as well. If I put the REPLACE_REGEXPR Statement in a CASE WHEN Table3.Status like ‘test with the ID % is done’ then REPLACE_REGEXPR ('test with the id [[:digit:]]* is done' FLAG 'i' IN Table3.STATUS WITH 'Test is done') "replace_regexpr" ELSE WHEN xxxxx ELSE WHEN xxx ELSE Table3.STATUS end as replace_regexpr FROM Table3 I get a Syntax is incorrect near """ error message. Do you know what the Problem could be?
            – Mike B
            Nov 13 at 9:05










          • I added a new expressions that you can use as a seperate column data in your code, I hope it helps
            – Eralper
            Nov 13 at 11:16










          • Again, thank you very much Eralper, Maybe I was not clear enough with my wording About the different Status entries. The do not only have this pattern like you assumed. Just to Name a few: Test [[with the ID 1237]] is done, Ticketnumber[[: 9G62J]], [[OE_1559C: ]]New RSKT.... in these examples the part that needs to be removed is marked in [] …. sorry for the missunderstanding and thanks again for your patients and help! Edit: I have about 20 different wordings that need to be harmonized
            – Mike B
            Nov 13 at 11:26












          • And as a result what do you want to see in the output? You can use " | " pipe sign to search for static text in status, but if you want to modify the output then maybe we should use place holders
            – Eralper
            Nov 13 at 11:59










          • Test [[with the ID 1237]] is done should be Test is done - Ticketnumber:9G62J should be Ticketnumber - OE_1559C: New RSKT should be New RSKT
            – Mike B
            Nov 13 at 12:09
















          Thank you very much Eralper, really! The Statement is finally working! As stated in the "additional Info" part of my post, I would need to replace other Strings like the "Test is done“ as well. If I put the REPLACE_REGEXPR Statement in a CASE WHEN Table3.Status like ‘test with the ID % is done’ then REPLACE_REGEXPR ('test with the id [[:digit:]]* is done' FLAG 'i' IN Table3.STATUS WITH 'Test is done') "replace_regexpr" ELSE WHEN xxxxx ELSE WHEN xxx ELSE Table3.STATUS end as replace_regexpr FROM Table3 I get a Syntax is incorrect near """ error message. Do you know what the Problem could be?
          – Mike B
          Nov 13 at 9:05




          Thank you very much Eralper, really! The Statement is finally working! As stated in the "additional Info" part of my post, I would need to replace other Strings like the "Test is done“ as well. If I put the REPLACE_REGEXPR Statement in a CASE WHEN Table3.Status like ‘test with the ID % is done’ then REPLACE_REGEXPR ('test with the id [[:digit:]]* is done' FLAG 'i' IN Table3.STATUS WITH 'Test is done') "replace_regexpr" ELSE WHEN xxxxx ELSE WHEN xxx ELSE Table3.STATUS end as replace_regexpr FROM Table3 I get a Syntax is incorrect near """ error message. Do you know what the Problem could be?
          – Mike B
          Nov 13 at 9:05












          I added a new expressions that you can use as a seperate column data in your code, I hope it helps
          – Eralper
          Nov 13 at 11:16




          I added a new expressions that you can use as a seperate column data in your code, I hope it helps
          – Eralper
          Nov 13 at 11:16












          Again, thank you very much Eralper, Maybe I was not clear enough with my wording About the different Status entries. The do not only have this pattern like you assumed. Just to Name a few: Test [[with the ID 1237]] is done, Ticketnumber[[: 9G62J]], [[OE_1559C: ]]New RSKT.... in these examples the part that needs to be removed is marked in [] …. sorry for the missunderstanding and thanks again for your patients and help! Edit: I have about 20 different wordings that need to be harmonized
          – Mike B
          Nov 13 at 11:26






          Again, thank you very much Eralper, Maybe I was not clear enough with my wording About the different Status entries. The do not only have this pattern like you assumed. Just to Name a few: Test [[with the ID 1237]] is done, Ticketnumber[[: 9G62J]], [[OE_1559C: ]]New RSKT.... in these examples the part that needs to be removed is marked in [] …. sorry for the missunderstanding and thanks again for your patients and help! Edit: I have about 20 different wordings that need to be harmonized
          – Mike B
          Nov 13 at 11:26














          And as a result what do you want to see in the output? You can use " | " pipe sign to search for static text in status, but if you want to modify the output then maybe we should use place holders
          – Eralper
          Nov 13 at 11:59




          And as a result what do you want to see in the output? You can use " | " pipe sign to search for static text in status, but if you want to modify the output then maybe we should use place holders
          – Eralper
          Nov 13 at 11:59












          Test [[with the ID 1237]] is done should be Test is done - Ticketnumber:9G62J should be Ticketnumber - OE_1559C: New RSKT should be New RSKT
          – Mike B
          Nov 13 at 12:09




          Test [[with the ID 1237]] is done should be Test is done - Ticketnumber:9G62J should be Ticketnumber - OE_1559C: New RSKT should be New RSKT
          – Mike B
          Nov 13 at 12:09


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53260132%2fsql-sap-hana-replace-regexpr-in-column-table%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          鏡平學校

          ꓛꓣだゔៀៅຸ໢ທຮ໕໒ ,ໂ'໥໓າ໼ឨឲ៵៭ៈゎゔit''䖳𥁄卿' ☨₤₨こゎもょの;ꜹꟚꞖꞵꟅꞛေၦေɯ,ɨɡ𛃵𛁹ޝ޳ޠ޾,ޤޒޯ޾𫝒𫠁သ𛅤チョ'サノބޘދ𛁐ᶿᶇᶀᶋᶠ㨑㽹⻮ꧬ꧹؍۩وَؠ㇕㇃㇪ ㇦㇋㇋ṜẰᵡᴠ 軌ᵕ搜۳ٰޗޮ޷ސޯ𫖾𫅀ल, ꙭ꙰ꚅꙁꚊꞻꝔ꟠Ꝭㄤﺟޱސꧨꧼ꧴ꧯꧽ꧲ꧯ'⽹⽭⾁⿞⼳⽋២៩ញណើꩯꩤ꩸ꩮᶻᶺᶧᶂ𫳲𫪭𬸄𫵰𬖩𬫣𬊉ၲ𛅬㕦䬺𫝌𫝼,,𫟖𫞽ហៅ஫㆔ాఆఅꙒꚞꙍ,Ꙟ꙱エ ,ポテ,フࢰࢯ𫟠𫞶 𫝤𫟠ﺕﹱﻜﻣ𪵕𪭸𪻆𪾩𫔷ġ,ŧآꞪ꟥,ꞔꝻ♚☹⛵𛀌ꬷꭞȄƁƪƬșƦǙǗdžƝǯǧⱦⱰꓕꓢႋ神 ဴ၀க௭எ௫ឫោ ' េㇷㇴㇼ神ㇸㇲㇽㇴㇼㇻㇸ'ㇸㇿㇸㇹㇰㆣꓚꓤ₡₧ ㄨㄟ㄂ㄖㄎ໗ツڒذ₶।ऩछएोञयूटक़कयँृी,冬'𛅢𛅥ㇱㇵㇶ𥄥𦒽𠣧𠊓𧢖𥞘𩔋цѰㄠſtʯʭɿʆʗʍʩɷɛ,əʏダヵㄐㄘR{gỚṖḺờṠṫảḙḭᴮᵏᴘᵀᵷᵕᴜᴏᵾq﮲ﲿﴽﭙ軌ﰬﶚﶧ﫲Ҝжюїкӈㇴffצּ﬘﭅﬈軌'ffistfflſtffतभफɳɰʊɲʎ𛁱𛁖𛁮𛀉 𛂯𛀞నఋŀŲ 𫟲𫠖𫞺ຆຆ ໹້໕໗ๆทԊꧢꧠ꧰ꓱ⿝⼑ŎḬẃẖỐẅ ,ờỰỈỗﮊDžȩꭏꭎꬻ꭮ꬿꭖꭥꭅ㇭神 ⾈ꓵꓑ⺄㄄ㄪㄙㄅㄇstA۵䞽ॶ𫞑𫝄㇉㇇゜軌𩜛𩳠Jﻺ‚Üမ႕ႌႊၐၸဓၞၞၡ៸wyvtᶎᶪᶹစဎ꣡꣰꣢꣤ٗ؋لㇳㇾㇻㇱ㆐㆔,,㆟Ⱶヤマފ޼ޝަݿݞݠݷݐ',ݘ,ݪݙݵ𬝉𬜁𫝨𫞘くせぉて¼óû×ó£…𛅑הㄙくԗԀ5606神45,神796'𪤻𫞧ꓐ㄁ㄘɥɺꓵꓲ3''7034׉ⱦⱠˆ“𫝋ȍ,ꩲ軌꩷ꩶꩧꩫఞ۔فڱێظペサ神ナᴦᵑ47 9238їﻂ䐊䔉㠸﬎ffiﬣ,לּᴷᴦᵛᵽ,ᴨᵤ ᵸᵥᴗᵈꚏꚉꚟ⻆rtǟƴ𬎎

          Why https connections are so slow when debugging (stepping over) in Java?