Questions tagged [trim]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
2answers
36 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
1answer
62 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
1answer
31 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'?
1
vote
2answers
14k 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
4answers
566 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
1answer
2k 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 ...