Tab character disappearing in value when its the only character

Hi,
We have a data tier app that consumes some XML generated by another SQL Server instance. The information is passed via XML files. We noticed when loading the XML file back into an XML variable within SQL Server, any values which contain just a tab are lost.
This can be demonstrated by running this example code:
DECLARE @test1 NVARCHAR(max) = '<Delimiter> </Delimiter>', -- only a tab as the value
@test2 NVARCHAR(max) = '<Delimiter>. </Delimiter>' -- a tab with another character, in this case a .
SELECT
CAST(@test1 AS XML) AS [Example 1], -- doesn't work
CAST(@test2 AS XML) AS [Example 2], -- works
CAST(REPLACE(@test1,' ','&#009;') AS XML) AS [Example 3] -- works
The results are:
<Delimiter />
<Delimiter>. </Delimiter>
<Delimiter> </Delimiter>
Notice the first example disregarded the tab content, while the later 2 retained the tab.
Is there an option within SQL server that would enable us to retain special character values (one of which is the tab) without performing any special handling before casting to XML?
Thanks,
Jay :)
If you shake a kettle, does it boil faster?

Hi Elvis,
It worked. We got the source service to add xml:space="preserve", and if it came in missing, we added it before converting to XML. Any outgoing XML we used the query:
SET @xml.modify('insert attribute xml:space {"preserve"} into (/Test[1])')
To add the correct handling in. These links were also helpful in describing the handling:
http://msdn.microsoft.com/en-us/library/ms190965.aspx (White Space Handling in Typed XML)
http://technet.microsoft.com/en-us/library/ms187928(v=sql.100).aspx
Thanks for pointing in the right direction.
Cheers,
Jay :)
If you shake a kettle, does it boil faster?

Similar Messages

  • HT4061 what does the apple icon mean when its the only thing that appears on the screen

    what does the apple symbol mean when its the only thing that appears on the screen

    That yur iPod is sick
    Try the following to fix:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar       

  • I restored my ipod before connecting it to the computar and now it just stays at the screen like when its the silver apple is there a way to fix this?

    I restored my ipod before connecting it to the computar and now it just stays at the screen like when its the silver apple is there a way to fix this?

    - Have you tried resetting the Ipod:
    Press and hold the On/Off Sleep/Wake button and the Home
    button at the same time for at least ten seconds, until the Apple logo appears.-
    - Next connect it to your computer.  If iTunes sees the iPod restore the iPod,  First restore from backup and if problem persists restore to factory defaults/new iPod.
    - If iTunes does not see the iPod first try placing the iPod in recovery mode.  If not seen try placing it in DFU mode:
    Recovery mode:
    iPhone and iPod touch: Unable to update or restore
    DFU mode:
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings

  • I have an iPod 5th gen. My audiobook playlists disappeared. They show as "on this device" in iTunes, but I cannot locate them on the device. Even the audiobook tab has disappeared. This happed after the most recent iTunes udate.

    I have an iPod 5th gen. My audiobook playlists disappeared. They show as "on this device" in iTunes, but I cannot locate them on the device. Even the audiobook tab has disappeared. This happed after the most recent iTunes update.

    - Delete all AB and resync
    To delete all music go to Settings>General>Usage>Storage>Manage Storage>Audio Book (if present) and delete
    - Reset all settings                            
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                               
    iOS: Back up and restore your iOS device with iCloud or iTunes      
      - Restore to factory settings/new iOS device.                       

  • I have the ipad 1, ios 5.1 is its max, and garage band requires ios 7.0, how do i buy garage band version 1.3, its the only one that will work, apple is so hard to get a hold of on these kind of things.

    I have the ipad 1, Ios 5.1 is its max, and garage band requires ios 7.0, how do i buy garage band version 1.3, its the only one that will work, apple is so hard to get a hold of on these kind of things.

    Unfortunately the answer is still no.

  • Delta.edu patially hides behind home page until I CLICK ON it and its the only site that does this other computer does not do this.

    Question
    delta.edu patially hides behind home page until I CLICK ON it and its the only site that does this, other computer does not do this. i see .25 of ther home page.

    Did you disable all the extensions before restarting?
    If it works in Firefox Safe-mode then disable all extensions (Tools > Add-ons > Extensions) and then try to find which is causing it by enabling one extension at a time until the problem reappears.
    Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    In Firefox Safe mode these changes are effective:
    *all extensions are disabled
    *the default theme is used (no persona)
    *userChrome.css and userContent.css are ignored
    *the default toolbar layout is used (localstore-safe.rdf)
    *the Javascript JIT compiler is disabled
    *hardware acceleration is disabled
    *plugins are not affected
    *preferences are not affected

  • Bought new iphone 6 with Verizon plan 2/11/15. Tried to connect with home wifi  3 or 4 times with I thought the correct password. Now it says Forget This Network Can't its the only one I have and this laptop is connected just fine. How do I clear this and

      Bought a new iphone 6 with Verizon plan 2/11/15. Tried to connect with my home wifi  3 or 4 times with I thought the correct password but now it says Forget This Network and wont let me try again. Can't its the only network available. How do I clear this and start over. Thanks, this laptop connects fine but this is my first smartphone and  I don't see why it gives a crap if I  mess up 50 times! Help!

    Help is right here for you Omichael! Let's get you conneted
    to your home wifi. May I ask are you able to connect to other wifi networks? If
    so then please forget your home network again, turn wifi off, reboot, and
    retest. If this doesn't work then you will want to reset network settings.
    Settings > General > Reset > Reset Network Settings. Keep in mind that
    this will delete ALL wifi passwords that you have saved.
    ArnettH_VZW
    Follow us on Twitter @VZWSupport

  • HT4484 how can i change my security questions??????? its the only part that dont have the edit part

    how can i change my security questions??????? its the only part that dont have the edit part

    Call AppleCare for your country and ask for help resetting the questions.

  • I have a ipad2 and I have no picture when its up only the apple signal and thinking icon. What do I do?

    I have an ipad 2 and I have no picture when its on right now I only have the apple signal and thinking icon. What do I do?

    First, try a system reset.  It cures many ills and it's quick, easy and harmless...
    Hold down the on/off switch and the Home button simultaneously until the screen blacks out or you see the Apple logo.  Ignore the "Slide to power off" text if it appears.  You will not lose any apps, data, music, movies, settings, etc.
    If the Reset doesn't work, try a Restore.  Note that it's nowhere near as quick as a Reset.  Connect via cable to the computer that you use for sync.  From iTunes, select the iPad/iPod and then select the Summary tab.  Follow directions for Restore and be sure to say "yes" to the backup.  You will be warned that all data (apps, music, movies, etc.) will be erased but, as the Restore finishes, you will be asked if you wish the contents of the backup to be copied to the iPad/iPod.  Again, say "yes."

  • Calculating the actual value when creating the input schedule on BPC NW 7.0

    Hello Experts,
    I have One questions regarding the calculation when building the input schedule.
    the structure of this input schedule is like this:
    CV: App01-time-entity-account-version-p_datasource ...
                      Plan Value   Actual Value
    Project       1000
    In the backend of BPC ,The Actual value is retrived from other system using BW DTP function, and with the monthly based line item.  We build the BPC-mutiprovider by the actual value cube and the plan data cube.
    From the BPC Office view, we want display the actual value by aggregating historice data till the month which user selected in the current view. These actual data is just the reference for user when they input the plan data. so we dont want these data stored in the application or database.
    Can anyone give us some hints?
    Thanks a lot in advance!
    Best Regards,
    Vivi
    Edited by: Vivi Sun on Jan 19, 2009 1:12 PM

    Vivi,
    Were you able to accomplish what you were looking to do? I would appreciate if you could share that info with us.
    Thanks.

  • Ü Character being replaced ? when writing the data to CSV from DB in Linux

    Hi All,
    Can anyone help me in understanding the exact cause of my issue
    Issue Description: Ü Character being replaced ? or when writing the data to CSV from DB in Linux.
    Shell used: ksh
    Actual string: MÜNCHENER RÜCKVERSICHERUNGS-GESELLSCHAFT AG
    Output String: M?NCHENER R?CKVERSICHERUNGS-GESELLSCHAFT AG
    locale ouput:
    LANG=en_US.UTF-8
    LC_CTYPE="en_US.UTF-8"
    LC_NUMERIC="en_US.UTF-8"
    LC_TIME="en_US.UTF-8"
    LC_COLLATE="en_US.UTF-8"
    LC_MONETARY="en_US.UTF-8"
    LC_MESSAGES="en_US.UTF-8"
    LC_PAPER="en_US.UTF-8"
    LC_NAME="en_US.UTF-8"
    LC_ADDRESS="en_US.UTF-8"
    LC_TELEPHONE="en_US.UTF-8"
    LC_MEASUREMENT="en_US.UTF-8"
    LC_IDENTIFICATION="en_US.UTF-8"
    LC_ALL=
    Environment variable set: NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
    Linux Version: 2.6.18-128.el5 128 bit
    java Version: 1.6
    Oracle DB version: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    When i query directly from DB i get the data in right format but when i write the same data to a csv file then the above problem occurs.
    Can anyone please suggest me what could be the cause for this issue?
    Regards,
    Shiva

    Hi Srini,
    We are using Java based ETL specifically written for our application. we are using sqlplus to make DB connections. am using vi editor to see the data. After the Extraction process the data processed in also in the wrong format.
    Regards,
    Shiva

  • How to populate who column values, when commiting the transaction?

    Hi,
    In Oracle forms we can populate who columns thru FND_STANDARD.SET_WHO;
    How is it in OAF?. Standard setter methods are sufficient or do I need to code something to get the values.
    Thanks

    Yes, all Setter methods are in EOImpl object. After I commit the trasnaction, who columns are showing as null.
    CreationDate
    CreatedBy
    LastUpdatedBy
    LastUpdateDate
    LastUpdateLogin
    * Gets the attribute value for CreationDate, using the alias name CreationDate
    public Date getCreationDate()
    return (Date)getAttributeInternal(CREATIONDATE);
    * Sets <code>value</code> as the attribute value for CreationDate
    public void setCreationDate(Date value)
    setAttributeInternal(CREATIONDATE, value);
    * Gets the attribute value for CreatedBy, using the alias name CreatedBy
    public Number getCreatedBy()
    return (Number)getAttributeInternal(CREATEDBY);
    * Sets <code>value</code> as the attribute value for CreatedBy
    public void setCreatedBy(Number value)
    setAttributeInternal(CREATEDBY, value);
    * Gets the attribute value for LastUpdatedBy, using the alias name LastUpdatedBy
    public Number getLastUpdatedBy()
    return (Number)getAttributeInternal(LASTUPDATEDBY);
    * Sets <code>value</code> as the attribute value for LastUpdatedBy
    public void setLastUpdatedBy(Number value)
    setAttributeInternal(LASTUPDATEDBY, value);
    * Gets the attribute value for LastUpdateDate, using the alias name LastUpdateDate
    public Date getLastUpdateDate()
    return (Date)getAttributeInternal(LASTUPDATEDATE);
    * Sets <code>value</code> as the attribute value for LastUpdateDate
    public void setLastUpdateDate(Date value)
    setAttributeInternal(LASTUPDATEDATE, value);
    public Number getLastUpdateLogin()
    return (Number)getAttributeInternal(LASTUPDATELOGIN);
    * Sets <code>value</code> as the attribute value for LastUpdateLogin
    public void setLastUpdateLogin(Number value)
    setAttributeInternal(LASTUPDATELOGIN, value);
    protected void updateRowWho()
    OADBTransaction oadbtransaction = getOADBTransaction();
    if(oadbtransaction.isLoggingEnabled(2))
    oadbtransaction.writeDiagnostics(this, "Entering updateRowWho", 2);
    oadbtransaction.writeDiagnostics(this, "Not updating WHO columns", 2);
    oadbtransaction.writeDiagnostics(this, "Leaving updateRowWho", 2);
    protected void createRowWho()
    OADBTransaction oadbtransaction = getOADBTransaction();
    if(oadbtransaction.isLoggingEnabled(2))
    oadbtransaction.writeDiagnostics(this, "Entering createRowWho", 2);
    oadbtransaction.writeDiagnostics(this, "Not updating WHO columns", 2);
    oadbtransaction.writeDiagnostics(this, "Leaving createRowWho", 2);
    Thanks

  • Regular is the only Character available

    CS2 on XP
    For any font, Regular is the only listed Character, each font will show multiple "Regular" instead of showing Italic, Condensed or Bold.
    If I go down the list and randomly select a "Regular" the font will show up as Italic or Condensed or whatever I guess is supposed to be in that spot.
    Or if I select an existing piece of text that is already created, the Character box in the toolbar header, is just blank.
    Any idea what I can do to fix this short of a reinstall?
    I also have CS4 and that is working fine, so I do not think it is not a Windows font issue.

    ps... are there really 8 other Ozzwomen on this forum? 
            and is this Wizard of, or Ozborne in nature????  jk...
    Shhh...it's a secret, all the other 8 are in hiding It's just a name...and it's a name I somehow ran across yrs ago that no one else ever seems to take lol.
    Sorry I dunno more about Windows fonts since most of my work is done on a Mac, so I don't think I can provide much more assistance.

  • I am having a crashing problem now for about a week on my farmville on facebook...its the only one that is crashing...can you please help??

    it is saying:
    The Adobe flash plug has crashed. It has been doing this for about a week and it is the only game it does it on. Please could you help me find out the problem.

    warhorse2004 wrote:
    How do you unsubscribe from the forums and delete this post...thanks
    I replied to your other question Could someone tell me how to deactivate or leave the groups?

  • Reminders are not appearing in Mail - and its the only way to set labels for flags.

    Every place I look for information about how to set the labels for flags in Mountain Lion Mail shows that they're editable once you click "show" next to "REMINDERS" in the sidebar. However, my sidebar has no "REMINDERS" heading, and there seems to be no preference or option anywhere related to this. I upgraded from Snow Leopard today; I had reminders showing (as "To Do's"). I really really want to change the labels on the flags because they're useless otherwise.
    Am I the only one with this problem?

    Flags and reminders are no longer coupled in Mountain Lion.  So I'll try to explain how to see your flagged messages.
    You can see a sidebar in Mail that looks like this.  Yours may not display the "Flagged" row yet.  I'll explain that in a minute,  If you don't see this sidebar, make it visible by clicking that arrow on top that would say "Show" if the sidebar were invisible (it says "Hide" here):
    You can flag a message by clicking the "Flag Selected Message" in your favorites bar, which should appear just above the screenshot.  Once you have at least one flagged message, the "Flagged" row shown above will appear.
    I hope this helps.

Maybe you are looking for

  • Can't use ssh publickey, but only for a single host

    I've been using publickeys for a long time to connect my laptop to my server, but lately I can't connect when I'm in this place only. It is the same key and it works perfectly, except when I'm in this specific network. And it doesn't seem to be a fir

  • Problem endering Spry Horizontal Menu Bar in IE7...help.

    I have created a horizontal menu bar in DW CS4 using Spry. When I view using live view, everything is working. When I test in Firefox and Nomad, everything renders as expected. I have tested the page www.ridedesigns/newsite/index.htm using IE7 on bot

  • Is BB Curve 9320 for me?

    Hi guys! i'm not already a BB user, but i need to have some info about this device before i buy it. Now i explain you my situation: i actually use a GMail acount ([email protected]) to receive business emails that cusotmers write me at [email protect

  • How to remove carraige return from the field while loading external table

    I am facing an issue of not getting rid of carraige returns present in the fileds of the source .csv file while loading the records into external table. I had tried using LRTRIM, but it does not help. The error I am getting is: KUP-04021: field forma

  • Vimperator and persistent buffers window

    I was wondering if the persistent buffer feature was working for anyone here: :buffers[!] B Show a list of all buffers (=tabs). The special version :buffers! opens the buffer list in a persistent preview window. Call the special version of this comma