If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Pervasive.SQL > Remove Trailing Spaces from CHAR field

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-24-05, 22:03
schwaney schwaney is offline
Registered User
 
Join Date: Jul 2005
Posts: 5
Remove Trailing Spaces from CHAR field

I have used the following sample query to copy values from a CHAR field in one database to a CHAR field in another database. The 'from' database stores a value that does not use the entire CHAR field, but also does not have trailing spaces.

INSERT INTO db2..table(Value)
SELECT RTRIM(Value)
FROM db1..table

Considering that the above query works when copying data (without trailinf spaces) between databases, does anyone know why the following query does not remove trailing spaces when carrying it out across a single table within a single database:

UPDATE table SET Value = RTRIM(Value)

Unfortunately this has no impact. Does anyone have any ideas? Does anyone have any ideas for removing trailing spaces from a CHAR field? I know this is not a legitimate activity for the DataType, but I am working with a preexisting application and database and this is what is currently stored and what is required.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On