2022 Developer Survey is open! Take survey.

Questions tagged [trim]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
46 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 ...
user avatar
0 votes
2 answers
71 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-...
user avatar
1 vote
1 answer
98 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') ...
user avatar
0 votes
1 answer
24 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 ...
user avatar
1 vote
2 answers
134 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....
user avatar
1 vote
1 answer
844 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 ...
user avatar
3 votes
1 answer
41 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'?
user avatar
  • 31
1 vote
2 answers
26k 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' ...
user avatar
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 ...
user avatar
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 ...
user avatar