Questions tagged [trim]
The trim tag has no usage guidance.
11
questions
0
votes
2
answers
588
views
How to rtrim the slash character (/)?
rtrim('txt/','/')
What if we cannot use this version of the rtrim function.. How else to remove the trailing '/' from the end of a string (if present)?
0
votes
2
answers
862
views
updating values in table to remove specific word
Some of my data has - Automated two or more times. I need to replace the text so it only appears once
I first tried to get the value to display by using this failed query
SELECT TRIM('- Automated') As ...
0
votes
2
answers
140
views
MS SQL: SSD Trim after TRUNCATE / DROP?
I consider to use one of those fancy new SSD-only SAN systems for our new Microsoft SQL Server. "Fancy" means, that it supports / use stuff as block compression / deduplication / 0x00-...
1
vote
1
answer
691
views
To trim particular value in a column in Oracle sql
I have a regular expression select statement like below :
SELECT REGEXP_REPLACE(nvl(l.text_1, l.text),'^'||21810||'=|\|'
||21810||'=', '|'||21810||'='||'B1')
...
0
votes
1
answer
31
views
How to concatenate these two statements (RIGHT and LEFT)? I am trying to trim two characters off both the beginning and end of cell
Is it possible to either combine or concatenate the following two statements?
RIGHT(wp_postmeta.meta_value, LENGTH(meta_value) -2)
LEFT(wp_postmeta.meta_value, LENGTH(meta_value) -2)
What I am ...
1
vote
2
answers
439
views
SQL queries to get the duplicate records based on trim
I have a table that has got the below set of records.
UNMASK MASK
123 897609
00123 896509
0000456 5632789
456 32567889
5678 5632789
From the above table I need to select only the below records....
1
vote
1
answer
1k
views
Using SUBSTRING and RTRIM Together
I have a VARCHAR field that contains a city and a 2 digit state abbreviation, but there tends to be leading and trailing spaces in the field. I need to parse out the City and State Abbrev into ...
3
votes
1
answer
79
views
Unexpected behavior from ltrim in postgres
select ltrim('Test Thing', 'Test ');
Expected: 'Thing'
Actual Result: 'hing'
Why does the 'T' in 'Test' match and trim the 'T' from 'Thing'?
2
votes
2
answers
33k
views
How To Remove Spaces Between Characters In PostgreSQL?
I want to match two tables based on a specific column which is a card number, there are spaces between characters in some of card numbers in the second table like below:
'NES 123_4_5'
'MTS 678_9_0'
...
0
votes
4
answers
1k
views
TRIM() Function With Linked Server
I have a linked server connection for a postgresql into sql server. I can run this in Sql Server Select * from OpenQuery(LinkedServer,'Select * from alphadawg') and this returns all results, but the ...
2
votes
1
answer
3k
views
Trim a value in an xml column in MS SQL Server
I have a database with an XML column. I am trying to update (trim) an xml value of the xml column. I am running on Windows, SQL Server 2008 Express.
I did not find any way to trim directly in Xquery ...