
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2013 07:20 PM
I don't use SQL too much so I am probably doing this wrong, but what is the correct way to remove strings from a table?
In a custom report I have a column that displays the OU the computer is in. I want it to just show the final OU that the computer is in and not the full OU path. Right now I am doing that by nesting replace expressions which works, but I am at the 128 character limit. What is the correct way to filter out unwanted text?
In a custom report I have a column that displays the OU the computer is in. I want it to just show the final OU that the computer is in and not the full OU path. Right now I am doing that by nesting replace expressions which works, but I am at the 128 character limit. What is the correct way to filter out unwanted text?
Solved! Go to Solution.
Labels:
- Labels:
-
Report Center
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-22-2015 09:24 AM
FYI for everyone: this report example shows how you can shorten OUs.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-22-2015 09:24 AM
FYI for everyone: this report example shows how you can shorten OUs.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2013 09:16 PM
Is there specific text you can search for to delimit the text that you want to retain?
See Microsoft's T-SQL string functions.
You can use CharIndex or PatIndex to find a start/end point (Reverse if you need to search backward from the end of the string) and Left/Right/Substring to extract the text you want to retain.
[Edit to add:]
Suggestion: If you're not sure how to make it work, provide an example of the string you're trying to extract from and identify what text you're trying to extract from it.
See Microsoft's T-SQL string functions.
You can use CharIndex or PatIndex to find a start/end point (Reverse if you need to search backward from the end of the string) and Left/Right/Substring to extract the text you want to retain.
[Edit to add:]
Suggestion: If you're not sure how to make it work, provide an example of the string you're trying to extract from and identify what text you're trying to extract from it.
