String comparison [message #354606] |
Mon, 20 October 2008 09:55  |
jd2p
Messages: 3 Registered: October 2008 Location: Tegucigalpa, Honduras
|
Junior Member |
|
|
Hi,
At our company, we are adapting our ERP that traditionally ran on SQl Server to run against Oracle 9i. We've encountered a problem with string comparison because SQL Server ignores spaces to the right whereas Oracle doesnt. Is there a configuration setting to control this behavior? Altering every query to add a TRIM() function doesnt seem like an option considering the size of our application.
Example>
* the '_' means blank space
In SQL Server:
'03-000001' equals '03-000001_____'
In Oracle:
'03-000001' does NOT equal '03-000001_____'
I appreciate your responses and suggestions.
JuanDiego
|
|
|
|
|
Re: String comparison [message #354617 is a reply to message #354613] |
Mon, 20 October 2008 10:28   |
jd2p
Messages: 3 Registered: October 2008 Location: Tegucigalpa, Honduras
|
Junior Member |
|
|
Thanks Barbara, that DOES solve the problem but I'd like to see if I can find if theres another way since we are talking about over 300 tables with the same issue (I guess the spaces where added by the migration tool). If I dont, then that's the road we'll go.
Regards
|
|
|
Re: String comparison [message #354620 is a reply to message #354614] |
Mon, 20 October 2008 10:34   |
jd2p
Messages: 3 Registered: October 2008 Location: Tegucigalpa, Honduras
|
Junior Member |
|
|
Thank you Michel, I just read the "How to format your post?" entry, I needed that.
Using TRIM() is my other option. So just tu sum up, there is no way Oracle will ignore the white spaces to the right?
|
|
|
|