Last active
February 14, 2022 17:54
-
-
Save ddanielsantos/a28f2ae34e0a66ab60c6b532c4efd879 to your computer and use it in GitHub Desktop.
SAP Utilities
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- you must use this syntax to the trick work | |
| -- youre going to select a variable based on the desired field | |
| -- change the line 5 accordingly to your desired table | |
| /* SELECT * FROM OITB x */ | |
| DECLARE @ItemGroup AS VARCHAR(MAX) | |
| -- your variable from SAP becomes a SQL server variable | |
| SET @ItemGroup = '%' + /* x.ItmsGrpNam */ [%0] + '%' | |
| SELECT | |
| * | |
| FROM ( | |
| SELECT | |
| T0.ItemName, | |
| FROM | |
| OITM T0 | |
| WHERE | |
| T0.ItemName LIKE @ItemGroup | |
| ) AS TAB |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment