Creating xml format file with double dagger ‡ as delimiter

Hi,
My source files are delimited with double dagger (‡) and I am using openrowset to load the files to SQL Server. When I am creating the format file by specifying the delimiter as ‡, the format file created has a different delimiter than the specified one.
The new delimiter appearing in xml format file is ç.
Any help?
TIA
Nitesh Rai- Please mark the post as answered if it answers your question

How did you create format file?
Try this method and see if it works
http://visakhm.blogspot.com/2013/10/generate-format-files-based-on-table.html
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Similar Messages

  • Strange issue creating a BCP xml format file with double dagger '‡' (alt + 0135) as column terminator with bcp.exe

    Hi,
    I'm having issues generating a BCP XML format file using a fairly unusual column terminator, a double dagger symbol
    ‡ (alt + 0135) which I need to support.
    I'm experiencing this problem with bcp.exe for SQL2008 R2 and SQL2012.
    If I run the following command line:
    bcp MyDB.TMP.Test_Extract format nul -c -x -f "C:\BCP\format_file_dagger_test.xml" -T -S localhost\SQL2012 -t‡
    I end up with a XML format file like so:
    <?xml version="1.0"?>
    <BCPFORMAT xmlns="http://schemas.microsoft.com/sqlserver/2004/bulkload/format" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <RECORD>
      <FIELD ID="1" xsi:type="CharTerm" TERMINATOR="ç" MAX_LENGTH="255" COLLATION="SQL_Latin1_General_CP1_CI_AS"/>
      <FIELD ID="2" xsi:type="CharTerm" TERMINATOR="ç" MAX_LENGTH="50" 
    .. and so on.
    You will notice that the TERMINATOR="ç" (Minuscule c-cedilla) is output instead of TERMINATOR="‡". The
    ç character, is strangely enough is alt + 135 (and not alt + 0135) so this might more than a coincidence! I know you can specify the codepage but this switch applies the data being imported or extracted and not for the format file
    itself (I tried it anyway). 
    In order to use the XML file to bulk import I manually did a text substitution of 'ç' character for '‡' and then BCP imports '‡' data fine. 
    This character swap doesn't occur if I generate a non XML format file (the '‡' character is output in the format file correctly) however, this file produces other import errors, which I don't encounter if I use a standard delimiter like a comma. So I have stuck
    with the working XML format file which I prefer.
    Does anyone know why this is happening? I'm planning to automate the generation the of the XML format file and would like to avoid the additional step of text substitution if possible.
    Thank you.

    Hi Ham09,
    According to your description , we do a test and find that the character of the terminator is changed due to the code page of Operation System. When you choose the different time zone in Data and Time bar, and do the same bcp test, you will find it will
    export the different TERMINATOR in your XML format file. For example, you can import the character "ç" (alt + 135) in (UTC-12:00)International Date Line West time zone and (UTC+09:00)Osaka, Sapporo, Tokyo time zone, and check if the terminators are different.
    By default, the field terminator is the tab character (represented as \t). To represent a paragraph mark, use \r\n.
    For more information, there is detail about code page(Windows), you can review the following article.
    http://msdn.microsoft.com/en-us/library/windows/desktop/dd317752(v=vs.85).aspx
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Create XML format file in bulk insert with a data file with out delimiter

    Hello
    I have a date file with no delimiter like bellow
    0080970393102312072981103378000004329392643958
    0080970393102312072981103378000004329392643958
    I just know 5 first number in a line is for example "ID of bank"
    or 6th and 7th number in a line is for example "ID of employee"
    Could you help me how can I create a XML format file?
    thanks alot

    This is a fixed file format. We need to know the length of each field before creating the format file. Say you have said the first 5 characters are Bank ID and 6th to 7th as Employee ID ... then the XML should look like,
    <?xml version="1.0"?>
    <BCPFORMAT xmlns="http://schemas.microsoft.com/sqlserver/2004/bulkload/format"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <RECORD>
      <FIELD ID="1"xsi:type="CharFixed"LENGTH="5"/>
      <FIELD ID="2"xsi:type="CharFixed"LENGTH="2"/>
      <FIELD ID="3" xsi:type="CharFixed" LENGTH="8"/>
      <FIELD ID="4" xsi:type="CharFixed" LENGTH="14"/>
      <FIELD ID="5" xsi:type="CharFixed" LENGTH="14"/>
      <FIELD ID="6" xsi:type="CharFixed" LENGTH="1"/>
    </RECORD>
    <ROW>
      <COLUMNSOURCE="1"NAME="c1"xsi:type="SQLNCHAR"/>
      <COLUMNSOURCE="2"NAME="c2"xsi:type="SQLNCHAR"/>
      <COLUMN SOURCE="3" NAME="c3" xsi:type="SQLCHAR"/>
      <COLUMN SOURCE="4" NAME="c4" xsi:type="SQLINT"
    />
      <COLUMN SOURCE="5" NAME="c5" xsi:type="SQLINT"
    />
    </ROW>
    </BCPFORMAT>
    Note: Similarly you need to specify the other length as well.
    http://stackoverflow.com/questions/10708985/bulk-insert-from-fixed-format-text-file-ignores-rowterminator
    Regards, RSingh

  • Creating a format file to map Incident records being imported from another tool in Service Manager.

    Hello, we are trying to import some of our Incident records from BMC Remedy into Service Manager.  Our data architect is running into some difficulty finding the necessary information to create the format file (we plan to use the CSV import process). 
    Is there a comprehensive document that details out all of the properties available for Incidents, affected users, relationships, etc. in order to build the XML format file?  For example, System.WorkItem.Incident is the main type for Incidents.  Under
    that, there is an 'Affected User' class. 
    Is anyone aware of this type of documentation for Service Manager?
    Thanks in advance,
    Brett

    Hi,
    Affected user' is a relationship. System.User is a class. Your data architect has to investigate SCSM management packs to get the required info. Use this PowerShell command with standard SCSM poweshell console to get all management packs in pure XML. "c:\mp"
    is a path that you could change.
    Get-SCSMManagementPack | Export-SCSMManagementPack -Path c:\mp
    Cheers,
    Marat
    Site: www.scutils.com  Twitter:
      LinkedIn:
      Facebook:

  • Want attach the XML data file with layout template in Oracle 10g

    Hi All,
    I need a help from you genius guys.
    I am genrating reports in BI with xml the procedure which I am following is as below.
    1. generating XML from the RDF
    2. creating a template in .rtf format
    3.after that loading the xml to the template then getting the required report.
    This all is doing through the given buttons
    But now my requirement is to create the gui from user can select the report and get the desire output file so how we would be able to attach the XML data file with layout template in Oracle 10g.
    If you require more detail please let me knnow.
    Thanks,
    Harry

    I am not using Oracle apps.
    I am using oracle 10g reports and I get something in it like one patch I downloded and one java code is having which creates the batch file ...still I am working on it ..
    If you will get some please share so that it will be helpful.
    Thanks,
    Harry

  • Create XML external file through BIP

    Hi All,
    I'm trying to create an XML document to send to a printing company.
    I've created the XSL template file and uploaded into BIP as an XSL Stylesheet.
    The problem I'm having is how to call the stylesheet from within an RTF file, so I can create an XML formatted file to send to the printing company.
    Can anyone point me in the right direction?
    Thanks, Rod.

    Marcus
    i'd recommend you create an empty project file in FCP and export it to XML.
    use the exported file as resource data, as it provides you with the basic XML project file container.
    then you can just add the additional <parent> and <child> elements as required
    also highly recommended would be the free XMLLib osax from Satimage, although it would be better if you learn how to do it with the built in libraries
    for basic aplescript info, visit http://applescriptsourcebook.com/
    cheers
    Andy

  • Create a flat file with multiple characters for enclosures

    Hello,
    we use OWB 11g2 (11.2.02).
    Now we try to create a flat file with multiple characters for enclosures. The manual wrote:
    "Enclosures (Left and Right): Some delimited files contain enclosures that denote text strings within a field. If the file contains enclosures, enter an enclosure character in the text box or select one from the list. The list displays commonenclosures. However, you may enter any character. The default for both the left and right enclosure is the double quotation mark ("). You can specify multiple characters and hexadecimal characters as field enclosures."
    But it will not work. The OWB use the first character from the left enclosure definition as left enclosure and the second one as right enclosure !?!
    Did anyone know this behavior? Is there a solution for this problem?
    Thanks and regards
    Norbert

    HI Raghu,
               Use the function module 'GUI_UPLOAD'.
               In that you have to specify the field_separator value = 'X' in export section.
    Regards,
    S.C.K

  • Sublime Text 2 won't open files with double click

    Hi, this is my first time asking for something.
    Well, i've been using Scribes, but sometimes i need tabs in my text editor, so i installed Sublime Text 2.
    The problem is that i can't open files with double click, i need to use "subl filename" and that it's not funny :S
    If i double click a file ST2 opens, but with a tab named "file" and without content.
    Is there a fix for that?
    My Arch installation (if is neccesary):
    Arch x86_64
    Openbox (stand-alone)
    PCManFM
    P.D: sorry for my english D:

    the reason seems to be a broken desktop file.  `/usr/share/applications/sublime-text.desktop` says `Exec=subl %U`, but it should be `%f`. Also the Aur package does not provide a `subl` symlink so you should create one.

  • How to create a pdf file with CS5

    Hello, I'm new to PhotoShop CS5 and haven't figured out yet (despite two hours of trying) how to create a pdf file with pictures and texts.  Can someone please help me with this ?  The "help" button in CS5 doesn't seem to cover this question.  Nor do the FAQs.
    Thank you very much.

    Save As... Photoshop PDF.

  • How to create a csv file with NCS attributes?

    Hi
    i installed Cisco Prime NCS and trying to perform bulk update of device credentials with csv file.
    How to create a csv file with all required attributes?
    This is part of NCS online help talking about this topic:
    Bulk Update Devices—To update the device credentials in a bulk, select Bulk Update Devices from the Select a command drop-down list. The Bulk Update Devices page appears.You can choose a CSV file.
    Note        The CSV file contains a list of devices to be updated, one device per line. Each line is a comma separated list of device attributes. The first line describes the attributes included. The IP address attribute is mandatory.
    Bellow is test csv file i created but does not work:
    10.64.160.31,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
    10.64.160.31,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
    The error i am getting while importing this file:
    Missing mandatory field [ip_address] on header line:10.64.160.31,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
    Assistance appreciated.

    It looks like the IP address field is incorrectly set.,
    It should be as follows
    {Device IP},{Device Subnet Mask}, etc etc
    so a practical example of the aboove could be (i dont know if this is completely correct after the IP address / Subnet Mask)
    10.64.160.31,255.255.255.0,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
    below is a link to the documentation
    http://www.cisco.com/en/US/docs/wireless/ncs/1.0/configuration/guide/ctrlcfg.html#wp1840245
    HTH
    Darren

  • To create 3 diff files with same content but with diff names in same target

    Hi SapAll.
    i have got a a requirement where pi need to create 3 different files with same content but with different names under same target from a single Idoc.
    its an IDOC to 3 File Inteface.
    can any body help me in providing the differnt solutions for this without use of any script executions.
    will be waiitng for response.
    regards.
    Varma

    > i want to use only one communication channel to produce 3 different file names with same content ,so here i should use only one message mapping in 3 operation mappings .
    This is not possible to produce 3 different file names with single CC. You have to use 3 different CCs. unless you have going to use some other trick e.g some script to rename the file etc..
    As I suggested in my previous reply use Multi-Mapping Or create 3 different Interface Mappings (by using the same MM).
    Note: You have to create 3 different Inbound Message Interfaces (you can use the same Inbound Message Type) otherwise while creating the 3 Interface Determination it won't allow because of same Outbound & Inbound Message Interface. It will simply say Interface alreday exists..
    So, just use the Multi-Mapping which is best solution in my opinion, because the benefit of using multi-mapping are:
    1. You have to create only single Message Mapping
    2. Single Interface Mapping
    3. Single Receiver Determination
    4. Single Interface Determination
    5. 3 Receiver CCs (3 you have to use in any case)
    6. Performance wise it is good (read the blog's last 2 para)
    7. And last but not the least easy to maintain the scenario.

  • ABAP program to output data from SAP table to an XML format file?

    hello ABAP experts,
    Does anyone know how to output data from SAP table to an XML format file?  Would be appreciated if someone show the detailed sample codes and we will give you reward points!
    Thanks!

    Edited by: Jose Hugo De la cruz on Aug 19, 2009 8:23 PM

  • I'm so confused!! I just want to create interactive pdf files (with video and flash files), but this free trial version is confusing!! help!?!

    i'm so confused!! I just want to create interactive pdf files (with video and flash files), but this free trial version is confusing!! help!?!

    Thanks for your suggestions. I checked to see if the options you suggested were set incorrectly but they were set to sync all. This led me to think the problem was actually in the iphone. I re-initialized the iphone and did not allow the system to restore any of the previous settings. In essence, I forced the phone to reset to factory settings. Then my video podcasts started syncing. All is well now. I did notice that I had seven podcasts selected that were "HD" presentations, and as such, are not compatible with the iphone. I don't know if this had anything to do with my earlier situation, but now I'm getting the video podcasts automatically. I'm happy. It wasn't much fun forcing the iphone to forget all of my preferences and I'm still customizing the phone now several days later. I think I have everything working and back to normal except I haven't identified any of my email accounts as of yet. Thanks for your help.

  • My trackpad can't open file with double click

    i don't know what's going on, but my trackpad can't open file with double click. i have to open it with right click, open or open with. i've tried to fix it in the system preferences, it didn't work out well.

    William - you are wonderful!  I had looked at that - they were set to 'internal' which seemed like RH...but selecting the 'design view' and then reselecting 'use default editor' instead of 'auto-select editor' did it.  THANK YOU!!!!!

  • How do you create a jar file with txt and classes?

    Hey, I'm trying to create code to create a jar file with a text file, but I can't figure out how to add the text file. Here is what I have so far:
    try {
                // Name of jar file to write
                String archiveFile = "test.jar";
                Manifest jman = new Manifest();
                try {
                    // Create a manifest from a file
                    //InputStream fis = new FileInputStream("manifestfile");
                    //Manifest manifest = new Manifest(fis);
                    // Construct a string version of a manifest
                    StringBuffer sbuf = new StringBuffer();
                    sbuf.append("Manifest-Version: 1.0\n");
                    sbuf.append("Ant-Version: Apache Ant 1.7.1\n");
                    sbuf.append("Created-By: 1.5.0_19-137 (Apple Inc.)\n");
                    sbuf.append("Main-Class: Main\n");
                    sbuf.append("Class-Path: lib/swing-layout-1.0.3.jar\n");
                    sbuf.append("X-COMMENT: Main-Class will be added automatically by build\n");
                    // Convert the string to a input stream
                    InputStream is = new ByteArrayInputStream(sbuf.toString().getBytes("UTF-8"));
                    // Create the manifest
                    jman = new Manifest(is);
                } catch (IOException e) {
                FileOutputStream stream = new FileOutputStream(archiveFile, true);// archive file is jar file name
                JarOutputStream out = new JarOutputStream(stream, jman);
                out.putNextEntry(new JarEntry("test.txt"));
                out.closeEntry();
                out.close();
            } catch (Exception ex) {
            }It creates the .jar file with the correct manifest but I can't get it to write the test.txt or anything else into the jar file.
    -Gandolf
    Edited by: GanMatt on Jun 18, 2009 8:18 AM
    Edited by: GanMatt on Jun 18, 2009 8:19 AM

    Alright, my question has changed. Here's the code:
    try {
                // Name of jar file to write
                String archiveFile = "test.jar";
                Manifest jman = new Manifest();
                try {
                    // Create a manifest from a file
                    //InputStream fis = new FileInputStream("manifestfile");
                    //Manifest manifest = new Manifest(fis);
                    // Construct a string version of a manifest
                    StringBuffer sbuf = new StringBuffer();
                    sbuf.append("Manifest-Version: 1.0\n");
                    sbuf.append("Ant-Version: Apache Ant 1.7.1\n");
                    sbuf.append("Created-By: 1.5.0_19-137 (Apple Inc.)\n");
                    sbuf.append("Main-Class: Main\n");
                    sbuf.append("Class-Path: lib/swing-layout-1.0.3.jar\n");
                    sbuf.append("X-COMMENT: Main-Class will be added automatically by build\n");
                    // Convert the string to a input stream
                    InputStream is = new ByteArrayInputStream(sbuf.toString().getBytes("UTF-8"));
                    // Create the manifest
                    jman = new Manifest(is);
                } catch (IOException e) {
                FileOutputStream stream = new FileOutputStream(archiveFile, true);// archive file is jar file name
                JarOutputStream out = new JarOutputStream(stream, jman);
                out.putNextEntry(new JarEntry("test.txt"));
                out.write("Hi".getBytes());
                out.flush();
                out.closeEntry();
                out.close();
            } catch (Exception ex) {
                JOptionPane.showMessageDialog(this,ex.toString(),"BUG!",JOptionPane.INFORMATION_MESSAGE);
            }It creates the jar file with the txt file inside it, but I can't write "Hi" inside of the text file. Any ideas?
    -Gandolf

Maybe you are looking for

  • Sound in Application

    I'm just trying to play a song in a regular application, not in an applet. I mean just run the program in a command line window and play the tune. I have searched for a way to do this already and all I find is applet sounds. I have tried using play(g

  • White Space After Form

    I have a Salesforce form embeded into two pages on my website.  Both pages have extra white space at the bottom and I can't decrease the height of the embedded HTML form in order to bring the footer up.  Both forms can be found here: http://www.beck-

  • Defined values in a cicle of Loop

    Hello friends, I need your help to solve my problem, well. let´s start. I have some user defined values, and I need to read each value, and before a task, (compare to other value [voltage] and so do other task [this task is not relevant] ); But I don

  • An array of JPopupMenu

    Hi Guys, Is it possible to create an array of JPopupMenu using an array JMenuItem. If it can be used, is this right: - JPopupMenu ar[] = new JPopupMenu[4]; JMenuItem it[] = new JMenuItem[12]; How can I put the menu items in to popup menus. for instan

  • How can I transfer files and settings from a PC to a mac

    How can I transfer data and settings from PC to mac via cable as the method via the network seems excessively slow. What cables do I need Ethernet USB?