[英]Abap: Select the same field from two db tables into one column of the internal table with one select
[英]Delete internal table lines whose one column contains the character "+"
我想從內部表中刪除條目,該表的一列中沒有“+”。 現在,如果我想像這樣刪除它:
DELETE internal_table where field1 <> '+'.
它不起作用。 這意味着,它將“+”作為正則表達式,只選擇長度為 1 的任何字符。
現在我已經嘗試了幾件事:
DELETE internal_table where field1 <> '\+'.
DELETE internal_table where field1 <> |\+|.
DELETE internal_table where field1 <> `\+`.
這一切都不起作用。 使用字符串模板|\\+|
我收到錯誤“字符串模板中的未屏蔽符號 '\\'。
字段 1 是長度為 1 的字符字段。如何轉義字段 1 中只有“+”的行的“+”?
你可以在沒有正則表達式的情況下做到這一點:
DELETE internal_table
WHERE field CA '+'.
CA
代表包含任何,它將刪除字段包含“+”字符的所有行(與字段的長度或其他字符無關)。 如果您願意,您可以添加更多字符,例如CA '+-'
這意味着字符串包含一個 '+' 或一個 '-' 等。
如果要刪除不包含“+”的行,可以使用:
DELETE internal_table
WHERE field NA '+'.
這是直接 SAPHelp 的鏈接: https ://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abenlogexp_op.htm
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.