-1

How to remove question mark (?) that got into different fields of a table by a query in progress openedge or older version (9.1c)

Thanks

Tom Bascom
  • 13,405
  • 2
  • 27
  • 33
Junior
  • 1
  • What datatype is the field? – Jensd Jul 07 '14 at 08:25
  • This is a char a field and the value for example for a field contact-person is "Hameed ???". – Junior Jul 07 '14 at 11:17
  • As I am not sure that this will work through query/Code,I was just cleaning the data by replacing the ? with blank through notepad/edit plus. which actually is odd – Junior Jul 07 '14 at 11:17
  • Are you saying you edited the database file with notepad? If so, the chances are it's been corrupted and is going to cause you problems down the road. You'll need to restore from backup and write some code in order to clean this up. – Tim Kuehn Jul 07 '14 at 15:04

1 Answers1

1

The ? is Progress's representation for a missing value. To replace it, set the field to a legal value for that field.

For cases where you have trailing characters you want to get rid of - RIGHT-TRIM("string???", "?") will get rid of them for you. There are also LEFT-TRIM() and TRIM() functions you can use.

Tim Kuehn
  • 3,201
  • 1
  • 17
  • 23
  • This are character fields which got relavant values but along with that some junk got into. for example for a field contact-person the value is "Hameed ???". Currently I am manually cleaning up the data by replacing the ? with blanks but this looks odd – Junior Jul 07 '14 at 11:26
  • Ok - I've updated my answer to address your problem. – Tim Kuehn Jul 07 '14 at 13:19
  • REPLACE() might be useful as well if the unwanted characters are not at the end of the string. – Tom Bascom Jul 07 '14 at 14:14