Want to have option to trim Leading Spaces

Compares and synchronizes SQL database content.

Moderators: Chris Auckland, David Atkinson, richardjm, david connell

Want to have option to trim Leading Spaces

Postby vanram » Wed Jan 25, 2012 5:17 pm

I just had a data compare that i needed to trim leading spaces as well as trailing spaces. Please could you add this option.
vanram
 
Posts: 43
Joined: Tue Nov 29, 2005 6:59 pm

Postby chriskelly » Wed Jan 25, 2012 6:37 pm

Thank you for your suggestion. I have created a Feature Request (SDC-1303) for our development team to take in to consideration.
Chris Kelly
Technical Support Engineer
chriskelly
 
Posts: 330
Joined: Mon Apr 19, 2010 1:44 pm
Location: Cambridge, UK

Postby David Atkinson » Wed Jan 25, 2012 11:14 pm

Could you create a view that does the trimming and sync that back to the original table?

David Atkinson
Red Gate
David Atkinson
 
Posts: 1124
Joined: Mon Dec 05, 2005 4:54 pm
Location: Twitter: @dtabase

Postby vanram » Thu Jan 26, 2012 12:48 am

I agree that should work. This should have limited performance affect but would be another object in the DB to maintain...
vanram
 
Posts: 43
Joined: Tue Nov 29, 2005 6:59 pm

Postby David Atkinson » Thu Jan 26, 2012 1:37 am

So this is a regular use case rather than a one off? Can I ask why you are ending up with unwanted spaces in your fields?
David Atkinson
 
Posts: 1124
Joined: Mon Dec 05, 2005 4:54 pm
Location: Twitter: @dtabase

Postby vanram » Thu Jan 26, 2012 3:06 am

I am not sure how frequent this issue will be.

This comes about due to the source being a field coming from our ERP system (AS400) that is a concatenated string, we do now know how the spaces at the begining of this field come to be included.
vanram
 
Posts: 43
Joined: Tue Nov 29, 2005 6:59 pm

Postby David Atkinson » Thu Jan 26, 2012 10:03 am

We have had customers who have trailing spaces in their data (and therefore we have an option in the tool to trim these), but I think you're the first to have leading spaces. I guess my advice would be to try to fix the problem at the source, or to use the View suggestion if it's an infrequent occurrence.

If we get further requests for this, it's something we would definitely consider adding as an option.

David
David Atkinson
 
Posts: 1124
Joined: Mon Dec 05, 2005 4:54 pm
Location: Twitter: @dtabase

Postby vanram » Fri Jan 27, 2012 3:39 am

Fair enough, thx
vanram
 
Posts: 43
Joined: Tue Nov 29, 2005 6:59 pm


Return to SQL Data Compare Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests