on 04-04-2011 1:59 PM
Hi,
I would like to fetch some data from the database using SQL Query. The query retuns some data including spaces. When I print the result of the query in xml format I am not able to see the spaces over there. It is getting trimmed. Instead of space if I use any other character the query is returning it properly. I can convert this character to space again in my transaction using string replace method. But this will be time consuming. Is there any way in MII where my query can return data including space also.
Please let me know if you have any idea about this
Thanks in advance
Shaji
Shaji,
Do you mean the contents of a field is a space (or more than one space), or that the values include spaces at the beginning or end of the contents? Or something else. Also what kind of database and version are you trying to use?
Regards,
Mike
Edited by: Michael Appleby on Apr 4, 2011 6:35 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Shaji,
Why do you need the spaces at the end of the contents of a field?
And does the field contain mixed alphanumeric values or is numbers and spaces?
Also please provide the information on the database vendor and version. You may find out that the driver for the database removes the trailing spaces. Not sure how you would check that. But maybe others will have some ideas on it.
Regards,
Mike
Hi Mike,
Thanks again for your response. I am retrieving the space from the database because I would like to send this value in the IDOC. This will be the value for my SDATA tag in IDOC. That is the reason I am fetching space from database.
My Oracle version is Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production. I do not think the driver is trimming the space. Actually the issue is when I get the query result in the form of xml it is trimming the space.
Thanks again
Shaji
Hi Shaji,
What happens when you run the query in TOAD or via a webservice (or any other data retrieval method)?
I think you are fighting the wrong battle. I would get rid of the requirement to have the trimmed spaces and use some other mechanism in your IDoc. Spaces carry extra baggage when being processed. Using them as data is not a very good practice except in the normal course of text data. Remember the KISS rule.
Regards,
Mike
Edited by: Michael Appleby on Apr 5, 2011 3:38 PM
User | Count |
---|---|
11 | |
6 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.