Convert data in table to mix case

Hi All,
I have a table that contains data.
This table has to columns, an id and description.
I would like to update my table to convert data to mix case.
As of now, all of my data in the table are lower case.
What I mean by mix case is first letter for each word is uppercase and the rest are lower case.
is there a function i can use ?
example:
Amended/Resentence, Type UnknownThanks

You can use the INITCAP function.
update table
set description = INITCAP(description);Example:
create table test (description varchar(50));
Table created
insert into test values ('amended/resentence, type unknown');
1 row inserted
select * from test;
DESCRIPTION
amended/resentence, type unknown
update test set description = initcap(description);
1 row updated
select * from test;
DESCRIPTION
Amended/Resentence, Type Unknown

Similar Messages

  • Importing table with mixed case on MySQL

    I am trying to import a table form MySQL 5.0.  Two tables exist with the same name, with first letter capital in one and all lower case in the other (ex. Jobdetails, jobdetails).  After hitting the Show ATL button on the data source, all case sensitive settings are Yes.  The table with the first letter capital is always imported no matter which table is selected.  I can't import the lower case table.  I am on Data Services 12.2.
    Edited by: Russell Atwood on Feb 8, 2012 2:28 PM

    I have found that patchSet 9.2.0.3 fixes some bugs in Oracle Text.
    One of them is Bug 2684307: "Mixed tokens not uppercased with BASE_LETTER in multibyte database". That's exactly the problem i am dealing with.
    I will proceed to install this patchSet and verify that this does not happend anymore.

  • Converting mixed case table name to upper case

    I am migrating data from Access to Oracle and new tables and columns being created are in mixed case is there a way to convert all tablename or column name automatically.
    Also does the migration workbench handle the memo fields currently defined in my oracle database.

    If you want tables and columns to be created in Upper Case then make sure the Create ANSI-Compliance Names checkbox is unchecked in the options section.
    1.Open Workbench.
    2.Tools -> Options
    Memo fields are migrated to CLOB fields in Oracle.

  • BUG: Export DDL and Data fails for mixed case table/column names

    Hi there,
    I have found a bug in SQL Developer. See details below.
    Description:
    When "Export DDL and Data) function is used on a table/columns not named in UPPERCASE, sql generated by SQL Developer is invalid.
    Steps to reproduce:
    - open SQL Developer, connect to DB
    - make a table named "lowerCase" (in double quotes, so it won't be automatically changed to capital letters)
    - you may also add some columns, for example "lowerCol1", "UpCol2", ALLUPCOL3
    - add some data rows to the table
    - choose Tools -> Export DDL and Data
    - check exporting of tables and data, on "filter" tabs choose your "lowerCase" table
    - press "Apply"
    Error:
    Generated SQL contains invalid INSERTs: mixed-case table and columns are referenced without obligatory double quotes, which yields an error when generated script is executed (see below, relevant line is underlined)
    -- DDL for Table lowerCase
    CREATE TABLE "DBO_HT"."lowerCase"
    (     "lowerCol1" VARCHAR2(100),
         "UpCol2" VARCHAR2(100),
         "ALLUPCOL3" VARCHAR2(100)
    -- DATA FOR TABLE lowerCase
    -- FILTER = none used
    -- INSERTING into lowerCase
    Insert into lowerCase (lowerCol1,UpCol2,ALLUPCOL3) values ('lc','uc','auc');
    -- END DATA FOR TABLE lowerCase
    Remarks
    SQL Developer: version 1.2.1, build MAIN-32.13
    Oracle DBs: 9.2 & Express
    OS: Windows 2000 Professional
    If you need any more details/testing, let me know. I'd really appreciate a quick patch for this issue...
    Alternatively, do you know of any other simple way of copying a single database (it's called a schema in Oracle, right?) from one computer to another? Possibly something so simple like detaching->copying->reattaching mdf (data) files in SQL Server... I thought that this "Export DDL&Data" function will do, but as you can see I couldn't use it.
    I just need a simple solution that works - one operation on source to stuff, get the resulting files to other computer and one operation to have it running there... I think that such scenario is very basic, yet I just can't achieve it and I am simply not allowed to spend more time on it (read: our test project fails, my company rejects my "lobbying" and stays with MSSQL :/ )
    Thanks a lot & bye

    Thanks for your reply.
    ad. 1)
    You're right. I just wanted to give some very short feedback on my experiences with SQL Developer, so I didn't think starting new threads would be necessary, but as I was writing it became much bigger than I initially planned - sorry about that. I will make proper threads as soon as possible. Having "Edit post" button on this forum would also be useful.
    ad. 2)
    Generally, you're right - in most cases it's true that "switching DBMS is a major commitment" and "you will produce terrible code" if you don't learn the new one.
    However, I think that you miss one part of market here - the market that I think Express is also targeted on. I'd call it a "fire&forget databases" market; MySQL comes to mind as possibly most common solution here. It's the rather small systems, possibly web-accessed, whose data-throughput requirements are rather modest; the point is to store data at all, and not necesarily in fastest way, because given the amount of data that is used, even on low-end hardware it will work well enough. What's important here is its general ease of use - how easy is to set up such system, connect and access data, develop a software using it, how much maintenance is needed, how easy this maintenance is, how easy are the most common development tasks as creating a DB, moving a DB from test to production server etc. There, "how easy" directly translates to "how much time we need to set it up", which translates to "how much will the development will cost".
    Considering the current technology, switching the DBMS in such systems is not necesarily a major commitment and believe me that you will not produce terrible code. In many cases it's as simple as changing a switch in your ORM toolkit: hibernate.dialect = Hibernate.Dialect.OracleDialect vs MySQLDialect vs MsSql2005Dialect
    Therefore, in some part of market it's easy to switch DBMS, even on project-by-project basis. The reason to switch will appear when other DBMS makes life easier => development faster. From that point of view, I can understand my colleagues giving me an embarassing look and saying "come on, I won't read all these docs just to have db copied to test server". And it doesn't mean "they are not willing to learn anything new", it's just that they feel such basic task should have self-explaining solution that doesn't require mastering any special knowledge. And if they get such simple solutions somewhere else, it costs them nothing to change the hibernate dialect.
    I think Oracle did the great job with introducing the Express to this "fire&forget" market. The installation is a snap, it just works out of the box, nothing serious to configure, opposite to what I remember from installing and working on Oracle 9 a few years ago. In some places it's still "you need to start SQL*Plus and enter this script", but it's definitely less than before. I also find the SQL Developer a great tool, it can do most of what we need to do with the DB, it's also much better and pleasant to use over Oracle 9 tools. Still, a few basic things still require too much hassle, and I'd say taking your schema to another machine is one of them. So I think that, if you do it well, the "schema copy wizard" you mentioned might be very helpful. If I was to give any general advice for Express line of DB/tools, I'd say "make things simple" - make it "a DB you can't see".
    That's, IMHO, the way to attract more Express users.

  • Problem converting data in XML file to internal table data

    Hi all,
    I have a requirement. I need to convert an XML file to internal table data and based on that data do Goods Receipt in SAP.
    With the help of this blog /people/r.eijpe/blog/2005/11/10/xml-dom-processing-in-abap-part-i--convert-an-abap-table-into-xml-file-using-sap-dom-approach
    I am able to convert the XML file to data in SAP. But this blog will display the output on screen as ELELEMNT = nodename VALUE= value of that node.
    But I donu2019t want in that way, I want to store all the data in XML file in an internal table so that I can make use of those values and do Goods Recipt in SAP.
    Can some one suggest how should I read the data in an internal table.
    Here is my code..what changes should I make?
    *& Report  z_xit_xml_check
      REPORT  z_xit_xml_check.
      TYPE-POOLS: ixml.
      TYPES: BEGIN OF t_xml_line,
              data(256) TYPE x,
            END OF t_xml_line.
      DATA: l_ixml            TYPE REF TO if_ixml,
            l_streamfactory   TYPE REF TO if_ixml_stream_factory,
            l_parser          TYPE REF TO if_ixml_parser,
            l_istream         TYPE REF TO if_ixml_istream,
            l_document        TYPE REF TO if_ixml_document,
            l_node            TYPE REF TO if_ixml_node,
            l_xmldata         TYPE string.
      DATA: l_elem            TYPE REF TO if_ixml_element,
            l_root_node       TYPE REF TO if_ixml_node,
            l_next_node       TYPE REF TO if_ixml_node,
            l_name            TYPE string,
            l_iterator        TYPE REF TO if_ixml_node_iterator.
      DATA: l_xml_table       TYPE TABLE OF t_xml_line,
            l_xml_line        TYPE t_xml_line,
            l_xml_table_size  TYPE i.
      DATA: l_filename        TYPE string.
      PARAMETERS: pa_file TYPE char1024 DEFAULT 'c:\temp\orders_dtd.xml'.
    Validation of XML file: Only DTD included in xml document is supported
      PARAMETERS: pa_val  TYPE char1 AS CHECKBOX.
      START-OF-SELECTION.
      Creating the main iXML factory
        l_ixml = cl_ixml=>create( ).
      Creating a stream factory
        l_streamfactory = l_ixml->create_stream_factory( ).
        PERFORM get_xml_table CHANGING l_xml_table_size l_xml_table.
      wrap the table containing the file into a stream
        l_istream = l_streamfactory->create_istream_itable( table = l_xml_table
                                                        size  = l_xml_table_size ).
      Creating a document
        l_document = l_ixml->create_document( ).
      Create a Parser
        l_parser = l_ixml->create_parser( stream_factory = l_streamfactory
                                          istream        = l_istream
                                          document       = l_document ).
      Validate a document
        IF pa_val EQ 'X'.
          l_parser->set_validating( mode = if_ixml_parser=>co_validate ).
        ENDIF.
      Parse the stream
        IF l_parser->parse( ) NE 0.
          IF l_parser->num_errors( ) NE 0.
            DATA: parseerror TYPE REF TO if_ixml_parse_error,
                  str        TYPE string,
                  i          TYPE i,
                  count      TYPE i,
                  index      TYPE i.
            count = l_parser->num_errors( ).
            WRITE: count, ' parse errors have occured:'.
            index = 0.
            WHILE index < count.
              parseerror = l_parser->get_error( index = index ).
              i = parseerror->get_line( ).
              WRITE: 'line: ', i.
              i = parseerror->get_column( ).
              WRITE: 'column: ', i.
              str = parseerror->get_reason( ).
              WRITE: str.
              index = index + 1.
            ENDWHILE.
          ENDIF.
        ENDIF.
      Process the document
        IF l_parser->is_dom_generating( ) EQ 'X'.
          PERFORM process_dom USING l_document.
        ENDIF.
    *&      Form  get_xml_table
      FORM get_xml_table CHANGING l_xml_table_size TYPE i
                                  l_xml_table      TYPE STANDARD TABLE.
      Local variable declaration
        DATA: l_len      TYPE i,
              l_len2     TYPE i,
              l_tab      TYPE tsfixml,
              l_content  TYPE string,
              l_str1     TYPE string,
              c_conv     TYPE REF TO cl_abap_conv_in_ce,
              l_itab     TYPE TABLE OF string.
        l_filename = pa_file.
      upload a file from the client's workstation
        CALL METHOD cl_gui_frontend_services=>gui_upload
          EXPORTING
            filename   = l_filename
            filetype   = 'BIN'
          IMPORTING
            filelength = l_xml_table_size
          CHANGING
            data_tab   = l_xml_table
          EXCEPTIONS
            OTHERS     = 19.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      Writing the XML document to the screen
        CLEAR l_str1.
        LOOP AT l_xml_table INTO l_xml_line.
          c_conv = cl_abap_conv_in_ce=>create( input = l_xml_line-data replacement = space  ).
          c_conv->read( IMPORTING data = l_content len = l_len ).
          CONCATENATE l_str1 l_content INTO l_str1.
        ENDLOOP.
        l_str1 = l_str1+0(l_xml_table_size).
        SPLIT l_str1 AT cl_abap_char_utilities=>cr_lf INTO TABLE l_itab.
        WRITE: /.
        WRITE: /' XML File'.
        WRITE: /.
        LOOP AT l_itab INTO l_str1.
          REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>horizontal_tab IN
            l_str1 WITH space.
          WRITE: / l_str1.
        ENDLOOP.
        WRITE: /.
      ENDFORM.                    "get_xml_table
    *&      Form  process_dom
      FORM process_dom USING document TYPE REF TO if_ixml_document.
        DATA: node      TYPE REF TO if_ixml_node,
              iterator  TYPE REF TO if_ixml_node_iterator,
              nodemap   TYPE REF TO if_ixml_named_node_map,
              attr      TYPE REF TO if_ixml_node,
              name      TYPE string,
              prefix    TYPE string,
              value     TYPE string,
              indent    TYPE i,
              count     TYPE i,
              index     TYPE i.
        node ?= document.
        CHECK NOT node IS INITIAL.
        ULINE.
        WRITE: /.
        WRITE: /' DOM-TREE'.
        WRITE: /.
        IF node IS INITIAL. EXIT. ENDIF.
      create a node iterator
        iterator  = node->create_iterator( ).
      get current node
        node = iterator->get_next( ).
      loop over all nodes
        WHILE NOT node IS INITIAL.
          indent = node->get_height( ) * 2.
          indent = indent + 20.
          CASE node->get_type( ).
            WHEN if_ixml_node=>co_node_element.
            element node
              name    = node->get_name( ).
              nodemap = node->get_attributes( ).
              WRITE: / 'ELEMENT  :'.
              WRITE: AT indent name COLOR COL_POSITIVE INVERSE.
              IF NOT nodemap IS INITIAL.
              attributes
                count = nodemap->get_length( ).
                DO count TIMES.
                  index  = sy-index - 1.
                  attr   = nodemap->get_item( index ).
                  name   = attr->get_name( ).
                  prefix = attr->get_namespace_prefix( ).
                  value  = attr->get_value( ).
                  WRITE: / 'ATTRIBUTE:'.
                  WRITE: AT indent name  COLOR COL_HEADING INVERSE, '=',
                                   value COLOR COL_TOTAL   INVERSE.
                ENDDO.
              ENDIF.
            WHEN if_ixml_node=>co_node_text OR
                 if_ixml_node=>co_node_cdata_section.
            text node
              value  = node->get_value( ).
              WRITE: / 'VALUE     :'.
              WRITE: AT indent value COLOR COL_GROUP INVERSE.
          ENDCASE.
        advance to next node
          node = iterator->get_next( ).
        ENDWHILE.
      ENDFORM.                    "process_dom
    Any help would be highly apperciated.
    regards,
    Jessica Sam

    Pavel Vera,
    With your example i tries doing the following .....
    I tried  to convert the data of XML file to internal table data. I am collecting the data in internal table to do goos recipt with that data.
    Please find my XML file, ABAP pgm and XSLT pgm . I donu2019t know what I am missing I am not getting any output. I donu2019t know what is wrong please help me with this
    Below is my XML file, My code and XSLT Program. In the below XML file I need to collect Vendor Number, Order Number, and Date tags which occur only once for one XML file.
    I also need to collect the following tags from <Shipmentdetail>
    <Shipmentdetail> has following child nodes and I need to collect them
    TrackingNumber
    Freight
    Weight
    ShipmentDate
    ShipmentMethod
    Need to collect to collect the following tags from <ProductInformation>
    <ProductInformation> has following child nodes and I need to collect them
        LineNumber
        SKUNumber
        OrderedQuantity
        ShippedQuantity
        UOM
    The <Shipmentdetail> and <ProductInformation> are child nodes of <OrderShipment>
    The <Shipmentdetail> occurs only ones but the <ProductInformation> can occur once or many times and will be dynamic and differs depening on the input file.
    My XML file is as follows
    <?xml version="1.0" encoding="iso-8859-1" ?>
    - <ShipmentHeader>
      <AccountID />
    - <OrderShipment>
          <VendorNumber>1000</VendorNumber>
          <OrderNumber>P00009238</OrderNumber>
          <OrderType>Stock</OrderType>
          <Company />
          <Division />
         <Department />
         <Date>20061120</Date>
         <CartonCount>2</CartonCount>
         <ShipAllProducts>No</ShipAllProducts>
    -             <ShipmentDetail>
                      <TrackingNumber>1ZR3W891PG47477811</TrackingNumber>
                      <Freight>000000010000</Freight>
                      <ShipmentDate>20061120</ShipmentDate>
                      <ShipmentMethod>UPS1PS</ShipmentMethod>
                 </ShipmentDetail>
    -            <ProductInformation>
                     <LineNumber>000000001</LineNumber>
                     <SKUNumber>110FR</SKUNumber>
                     <AdvSKUNumber>003 4518</AdvSKUNumber>
                     <SKUID />
                     <OrderedQuantity>00000001000000</OrderedQuantity>
                     <ShippedQuantity>00000001000000</ShippedQuantity>
                     <UOM>EA</UOM>
                     <Factor>1</Factor>
                </ProductInformation>
    -           <ProductInformation>
                    <LineNumber>000000002</LineNumber>
                    <SKUNumber>938EN</SKUNumber>
                    <AdvSKUNumber>001 7294</AdvSKUNumber>
                    <SKUID />
                    <OrderedQuantity>00000000450000</OrderedQuantity>
                    <ShippedQuantity>00000000450000</ShippedQuantity>
                    <UOM>EA</UOM>
                    <Factor>1</Factor>
                </ProductInformation>
    -           <CaseInformation>
                   <LineNumber>000000001</LineNumber>
                   <SKUNumber>110FR</SKUNumber>
                   <AdvSKUNumber>003 4518</AdvSKUNumber>
                   <SKUID />
                   <SSCCNumber>00000001668000002487</SSCCNumber>
                   <CaseQuantity>00000001000000</CaseQuantity>
                   <UOM>EA</UOM>
                   <Factor>1</Factor>
                 </CaseInformation>
                 <CaseInformation>
                   <LineNumber>000000001</LineNumber>
                   <SKUNumber>110FR</SKUNumber>
                   <AdvSKUNumber>003 4518</AdvSKUNumber>
                   <SKUID />
                   <SSCCNumber>00000001668000002487</SSCCNumber>
                   <CaseQuantity>00000001000000</CaseQuantity>
                   <UOM>EA</UOM>
                   <Factor>1</Factor>
                 </CaseInformation>
    -  </OrderShipment>
      </ShipmentHeader>
    My Program
    TYPE-POOLS abap.
    CONSTANTS gs_file TYPE string VALUE 'C:\temp\test.xml'.
    * This is the structure for the data from the XML file
    TYPES: BEGIN OF ts_shipment,
             VendorNumber(10)     TYPE n,
             OrderNumber(20)      TYPE n,
             OrderType(8)         TYPE c,
             Date(8)              TYPE c,
           END OF ts_shipment.
    TYPES: BEGIN OF ts_shipmentdetail,
             TrackingNumber(30)     TYPE n,
             Freight(12)            TYPE n,
             Weight(14)             TYPE n,
             ShipmentDate(8)        TYPE c,
             ShipmentMethod(8)      TYPE c,
             END OF ts_shipmentdetail.
    TYPES: BEGIN OF ts_productinformation,
             LineNumber(9)          TYPE n,
             SKUNumber(20)          TYPE c,
             OrderedQuantity(14)    TYPE n,
             ShippedQuantity(14)    TYPE n,
             UOM(4)                 TYPE c,
             END OF ts_productinformation.
    * Table for the XML content
    DATA: gt_itab       TYPE STANDARD TABLE OF char2048.
    * Table and work ares for the data from the XML file
    DATA: gt_shipment               TYPE STANDARD TABLE OF ts_shipment,
          gs_shipment               TYPE ts_shipment.
    DATA: gt_shipmentdetail         TYPE STANDARD TABLE OF ts_shipmentdetail,
          gs_shipmentdetail         TYPE ts_shipmentdetail.
    DATA: gt_productinformation     TYPE STANDARD TABLE OF ts_productinformation,
          gs_productinformation     TYPE ts_productinformation.
    * Result table that contains references
    * of the internal tables to be filled
    DATA: gt_result_xml TYPE abap_trans_resbind_tab,
          gs_result_xml TYPE abap_trans_resbind.
    * For error handling
    DATA: gs_rif_ex     TYPE REF TO cx_root,
          gs_var_text   TYPE string.
    * Get the XML file from your client
    CALL METHOD cl_gui_frontend_services=>gui_upload
      EXPORTING
        filename                = gs_file
      CHANGING
        data_tab                = gt_itab
      EXCEPTIONS
        file_open_error         = 1
        file_read_error         = 2
        no_batch                = 3
        gui_refuse_filetransfer = 4
        invalid_type            = 5
        no_authority            = 6
        unknown_error           = 7
        bad_data_format         = 8
        header_not_allowed      = 9
        separator_not_allowed   = 10
        header_too_long         = 11
        unknown_dp_error        = 12
        access_denied           = 13
        dp_out_of_memory        = 14
        disk_full               = 15
        dp_timeout              = 16
        not_supported_by_gui    = 17
        error_no_gui            = 18
        OTHERS                  = 19.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    * Fill the result table with a reference to the data table.
    * Within the XSLT stylesheet, the data table can be accessed with
    * "ISHIPMENT".
    GET REFERENCE OF gt_shipment INTO gs_result_xml-value.
    gs_result_xml-name = 'ISHIPMENT'.
    APPEND gs_result_xml TO gt_result_xml.
    * Fill the result table with a reference to the data table.
    * Within the XSLT stylesheet, the data table can be accessed with
    * "ISHIPDET".
    GET REFERENCE OF gt_shipmentdetail INTO gs_result_xml-value.
    gs_result_xml-name = 'ISHIPDET'.
    APPEND gs_result_xml TO gt_result_xml.
    * Fill the result table with a reference to the data table.
    * Within the XSLT stylesheet, the data table can be accessed with
    * "IPRODDET".
    GET REFERENCE OF gt_productinformation  INTO gs_result_xml-value.
    gs_result_xml-name = 'IPRODDET'.
    APPEND gs_result_xml TO gt_result_xml.
    * Perform the XSLT stylesheet
    TRY.
        CALL TRANSFORMATION z_xml_to_abap3
        SOURCE XML gt_itab
        RESULT (gt_result_xml).
      CATCH cx_root INTO gs_rif_ex.
        gs_var_text = gs_rif_ex->get_text( ).
        MESSAGE gs_var_text TYPE 'E'.
    ENDTRY.
    * Writing the data from file for gt_shipment
    *Collecting the Shipping Data from the XML file to internal table gt_shipment
    *and writing the data to the screen
    LOOP AT gt_shipment INTO gs_shipment.
      WRITE: / 'VendorNumber:', gs_shipment-VendorNumber.
      WRITE: / 'OrderNumber :', gs_shipment-OrderNumber.
      WRITE: / 'OrderType  :', gs_shipment-OrderType.
      WRITE: / 'Date  :',      gs_shipment-Date.
      WRITE : /.
    ENDLOOP. "gt_shipment.
    LOOP AT gt_shipmentdetail INTO gs_shipmentdetail.
      WRITE: / 'TrackingNumber:',     gs_shipmentdetail-TrackingNumber.
      WRITE: / 'Freight :',           gs_shipmentdetail-Freight.
      WRITE: / 'Weight  :',           gs_shipmentdetail-Weight.
      WRITE: / 'ShipmentDate  :',     gs_shipmentdetail-ShipmentDate.
    * WRITE: / 'ShipmentMethod  :'    gs_shipmentdetail-ShipmentMethod
      WRITE : /.
    ENDLOOP. "gt_shipmentdetail.
    LOOP AT gt_productinformation INTO gs_productinformation.
      WRITE: / 'LineNumber:',         gs_productinformation-LineNumber.
      WRITE: / 'SKUNumber :',         gs_productinformation-SKUNumber.
      WRITE: / 'OrderedQuantity  :',  gs_productinformation-OrderedQuantity.
      WRITE: / 'ShippedQuantity  :',  gs_productinformation-ShippedQuantity.
      WRITE: / 'UOM  :',              gs_productinformation-UOM.
      WRITE : /.
    ENDLOOP. "gt_productinformation.
    XSLT Program
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
      <xsl:output encoding="iso-8859-1" indent="yes" method="xml" version="1.0"/>
      <xsl:strip-space elements="*"/>
      <xsl:template match="/">
        <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
          <asx:values>
            <ISHIPMENT>
              <xsl:apply-templates select="//OrderShipment"/>
            </ISHIPMENT>
          </asx:values>
        </asx:abap>
      </xsl:template>
      <xsl:template match="OrderShipment">
        <item>
          <VENDORNUMBER>
            <xsl:value-of select="VendorNumber"/>
          </VENDORNUMBER>
          <ORDERNUMBER>
            <xsl:value-of select="OrderNumber"/>
          </ORDERNUMBER>
          <ORDERTYPE>
            <xsl:value-of select="OrderType"/>
          </ORDERTYPE>
          <DATE>
            <xsl:value-of select="Date"/>
          </DATE>
        </item>
      </xsl:template>
      <xsl:template match="/">
        <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
          <asx:values>
            <ISHIPDET>
              <xsl:apply-templates select="//OrderShipment/ShipmentDetail"/>
            </ISHIPDET>
          </asx:values>
        </asx:abap>
      </xsl:template>
      <xsl:template match="ShipmentDetail">
        <item>
          <TRACKINGNUMBER>
            <xsl:value-of select="TrackingNumber"/>
          </TRACKINGNUMBER>
          <FREIGHT>
            <xsl:value-of select="Freight"/>
          </FREIGHT>
          <SHIPMENTDATE>
            <xsl:value-of select="ShipmentDate"/>
          </SHIPMENTDATE>
          <SHIPMENTMETHOD>
            <xsl:value-of select="ShipmentMethod"/>
          </SHIPMENTMETHOD>
        </item>
      </xsl:template>
    </xsl:transform> .
    Any help is highly appreciated. If anyone encountered this situation before please let me know where i am going wrong in my XSLT transformation.
    Any Help will be highly apppreciated. Thanks in advance
    Regards,
    Jessica   Sam

  • How to preserve mixed case in Data Dictionary

    Hi,
    I am very new to Oracle, please excuse in advance for silly questions.
    Using Oracle 9i R2, SQL Developer 1.51.5440.
    I don't know if it's Oracle DB or The SQL Developer tool, but the names of the object I create are all transformed in uppercase. Table name, column names, procedure names all are displayed in uppercase. And yet I make sure when I created them to use carefully mixed case to improve readability. Example: ProductID, MyTable, etc.
    I've gone over the options of SQL Developer, but I didn't see any option to turn off the automatic uppercase. Some objects still remains in mixed case, for example the content of a procedure still looks like when I typed it.
    Is there a way to get the object names to be displayed exactly as I created them?
    Thanks in advance.

    Ok, now I see, make senses that everybody keeps using uppercase. I have tried this:
    CREATE TABLE "MyTable" ("Col1" number not null, "Col2" varchar2(20) not null)
    And indeed, even SELECT * FROM MyTable would not work, I have to reference the table by SELECT * FROM "MyTable"
    FYI, in SQL Server, object names are case-insensitive. The name saved in the data dictionary is exactly how you type them. In the queries, constraints, indexes, etc., you can reference to the object name by any case. I find this way more convenient.
    One more question, in the current schema I am working on, where all object names are uppercase. How come I can still make a query with any case?
    For example if I type in SQL Developer: SELECT ProdUCTID, PrOduCTNaMe FROM T_proDuCT ;
    The query executes OK although I'd expect Oracle would complain about table not found. So are the following rules correct?
    1. If the object name was saved with double quote, Oracle will preserve the case and the object should always be referenced WITH double quote and the exact case.
    2. If the object name was save without double quote, Oracle will uppercase the name and the object can be reference by any case.

  • Generating mixed case for table and column names

    I trying to get table definition from Oracle 9i database into my toplink workbench
    (version 9.0.3), the column names and table names are capitilized by
    default, how do I change this to be mixed case? Thanks

    I'm not sure why you want them changed. The Oracle database by default is case insensitive, which in essence means it converts everything to upper case when a case is not specified (which can be done by wrapping it in quotes). Unfortunately, Java strings are case sensitive. This means that if you try searching resultsets for "TableName" when the database driver is returning "TABLENAME", you will run into problems. It is probably better to have your project match your database as closely as possible to avoid any issues later on.
    That said, I don't know of a way to automatically have the workbench use mixed case names - it uses the strings as they are returned from the database. I believe you will need to manually change the table names if you want them to be different than what you have imported.
    Best Regards,
    Chris

  • Fetching data from database in case of mixed case in SE37

    Hi,
    I have created a function module(in se37) where the input is Last name(PA0002-NACHN). My requirement is i have to fetch data from PA0002 based on last name. But the problem is if i give a name in mixed case(both upper and lower) sap converts the last name into Capital letter and starts searching the database.
                      But i tried in abap editor. here SAP accept the parameter(last name) as mixed case and starts searching. Why in function module the parameters are converted into upper case. How to restrict it.
                 If i will create a domain with LOWER CASE check box checked and try to call the dataelement in import part of function module then also it's converting it inot upper case. If i uncheck the lower case check box then also it's taking it as upper case.
                How to process the input parameter in function module(SE37) which should take the input as user enters,i.e if user enters small letter it should take it as small letter , if mixed letter it should take it as mixed letter and start searching.
    regards
    sandeep

    HI sandeep,
    <i>"If i will create a domain with LOWER CASE check box checked and try to call the dataelement in import part of function module then also it's converting it inot upper case. If i uncheck the lower case check box then also it's taking it as upper case."</i>
    I think the data is getting converted to upper case even before it is passed to this FM.
    Can yo ushow how are you testing this FM?
    If you are calling this FM in a abap program using a parameter, it will convert the text to upper case as and when you enter data the name in it.
    Regards,
    Ravi

  • Mixed case table/col names and JDeveloper?

    I am thinking of trying to use mixed case table/column names in my Oracle 8i database.
    My hope is to achieve table/column names consistent with Java conventions (which I am happy with).
    Would this work with Jdeveloper 3.1? 3.2?
    Will JDeveloper/BC4J then generate mixed case names?
    Will I cause my self lots of pain and suffering? (I don't consider having to enter a correct mixed case name a pain; I do consider always having to quote it and/or use TOUPPER, etc. a bit of pain)
    Thanks
    R.Parr
    Temporal Arts
    null

    I do consider always having to quote it and/or use TOUPPER, etc. a bit of pain)<<<JDEV isn't as much the issue. If you have simple applications and don't intend to change things over time, or create lots of interfaces, or support multiple development tools against the same database, mixed cases seem to work fine.
    To give yourself an idea of how cumbersome things will be, go in and
    create "myTable" ( "myField" varchar2(20) );
    now DESC ribe the table,
    select myField from it.
    Putting doublequotes around things all the time gets very irritating. Remember it is also for having special characters and embedded spaces... and I don't know of any PL/SQL SET ( other than the opposite: SQLCASE that forces just about everything to uppercase ).
    Oh, and then you get to encounter fun things like ODBC and JDBC drivers that may or may not like it. Or if you MOVE/EXPORT the data around, your target may or may not be happy.
    Working at several diversified, large organization with MANY database products/targets, I've become very disenchanted with making mixed case attributes and table names!
    All tools should support mixed case correctly. Reality has returned a mixed case of results. grin or not, as the case may be.
    null

  • Sending mixed case data

    Hi All,
    I need to pass a field with mixed case characters ( Example : JoeSmith) .
    If I dont  do a TOUPPER formula for this field in Transformation at the DSO stage, the load fails with that Hex conversion message.
    We don't want to convert to Uppercase for name fields.
    I have set ALL_CAPITAL in RSKC ( We are on BI 7.0 SP10 Unicode system)
    I tried by checking the Lower case flag for this field in the Datasource.
    I am aware of Lowercase checkbox in Infoobject maintainence - and I would rather not use that.
    Any ideas?
    HD

    I'd be looking at the input side of this. Is there a buffered stream that is not shared by the ObjectInputStream? If there is then the symptoms can be explained. A buffered stream will read in as much data as is available (up to some limit), regardless of whether that data is required. If you switch to the ObjectInputStream before the data has been consumed, then it has effectively been lost.
    The 200ms delay prevents the buffered stream from consuming the extra, and makes the program work.
    The solution is to ensure that the ObjectInputStream shares the buffered stream.
    Sylvia.

  • RE: Converting to mixed case.

    >
    I recall seeing a method that would convert all upper or all lower case to
    mixed case. Does this sound familiar to anyone?
    Hello Everyone
    I've developed a single Domain Class to support this behavior. With this
    Domain Class you can choice to convert to mixed case each word of the
    text or only the initial word and the word after a period by setting the
    value of the ToUpdateEachWord attribute (boolean).
    Here is an example of this domain class.
    I hope this help you.
    Victor Navarro
    [email protected]

    we have a database which I want to use as the source for generating a Java API, and I need/want the Java classes and attributes to be (automatically) created with mixed case names. At the same time we have existing applications and scripts that access the database, and these assume case insensitive table and column names.Not sure if I got you right, but how about creating views as e.g in
    SQL> create or replace view "Dept"
      2  as
      3     select deptno "Deptno", dname "Dname", loc "Loc" from dept
      4  /
    View created.This will allow you to continue to query in case insensitive manner as well as case sensitive:
    SQL>
    SQL> select * from dept
      2  /
             DEPTNO DNAME          LOC
                 10 ACCOUNTING     NEW YORK
                 20 RESEARCH       DALLAS
                 30 SALES          CHICAGO
                 40 OPERATIONS     BOSTON
    SQL> select * from "Dept"
      2  /
             Deptno Dname          Loc
                 10 ACCOUNTING     NEW YORK
                 20 RESEARCH       DALLAS
                 30 SALES          CHICAGO
                 40 OPERATIONS     BOSTON
    SQL>As I understand, you could use the views (instead of the tables) to automatically generate mixed case classes while continuing to have case insensitve queries?!

  • Convert mixed case value in colum into upper case values

    Hi All,
    I have got a table call emp and has the following colums:
    id number 10
    suename_name varchar2(20)
    given_name varchar2(20)
    position varchar2(30)
    date_hired date
    Now the values in colums are mixed case and I need to change them to upper case. I think I need to use upper function to do it.
    Could anyone help me by providing me sql/pl sql script to through each colum in emp table and change them to the upper case.
    Many Thanks
    Michael

    Hi,
    If you really want to try this using PL/SQL, then you'll have to use dynamic SQL, something like this untested code, since the table and column names are vaiable:
    SET   SERVEROUTPUT  ON  SIZE 50000
    DECLARE
         sql_txt     VARCHAR2 (4000);
    BEGIN
         FOR  r  IN ( SELECT  table_name
                   ,       column_name
                   FROM    user_tab_columns
                   WHERE   data_type = 'VARCHAR2'
              --   AND     ...  -- if you don't want all columns in all tables
         LOOP
              sql_txt := 'UPDATE "'
                   || r.table_name
                   || '" SET "'
                   || r.column_name
                   || '" = UPPER ("'
                   || r.column_name
                   || '")';
              dbms_output.put_line (sql_txt || ' = sql_txt');     -- For debugging
              -- EXECUTE IMMEDIATE sql_txt;               -- For real
         END LOOP;
    END;Dynamic SQL (here) means creating a string that contains the SQL statement to be done, then using EXECUTE IMMEDIATE to run it.
    Whenever you write dynamic SQL, it's a good idea to only display the SQL statement during the early stages of debugging. When it's displaying correctly, then you can try un-commenting the EXECUTE IMMEDIATE line.
    Edited by: Frank Kulash on Jul 19, 2009 4:40 PM
    A little more complicated, but a lot more efficient:
    SET   SERVEROUTPUT  ON  SIZE 50000
    DECLARE
         sql_txt          VARCHAR2 (4000);
    BEGIN
         FOR  r  IN ( SELECT    table_name
                   ,         column_name
                   ,         ROW_NUMBER () OVER ( PARTITION BY  table_name
                                      ORDER BY       column_name
                                    )     AS column_num
                   ,            COUNT (1)     OVER ( PARTITION BY  table_name
                                    )     AS total_column_cnt
                   FROM      user_tab_columns
                   WHERE     data_type = 'VARCHAR2'
              --   AND       ...  -- if you don't want all columns in all tables
                   ORDER BY  table_name
                   ,            column_name
         LOOP
              IF  r.column_num = 1
              THEN
                   sql_txt := 'UPDATE "'
                   || r.table_name
                   || '" SET "';
              ELSE
                   sql_txt := sql_txt || ', "';
              END IF;
              sql_txt := sql_txt ||
                   || r.column_name
                   || '" = UPPER ("'
                   || r.column_name
                   || '")';
              IF  r.column_num = r.total_column_cnt
              THEN     -- This is the last row for this table; run it
                   dbms_output.put_line (sql_txt || ' = sql_txt');     -- For debugging
                   -- EXECUTE IMMEDIATE sql_txt;               -- For real
              END IF;
         END LOOP;
    END;
    {code}
    The difference is that the first solution produces and executes a separate UPDATE statement for each column, like this:
    {code}
    UPDATE "TABLE_1" SET "COLUMN_A" = UPPER ("COLUMN_A");
    UPDATE "TABLE_1" SET "COLUMN_B" = UPPER ("COLUMN_B");
    UPDATE "TABLE_1" SET "COLUMN_C" = UPPER ("COLUMN_C");
    {code}
    but it's much more efficient to do change all the columns at once, as long as you have the row in hand.  So the second solution only creates one SQL statement per table, like this:
    {code}
    UPDATE "TABLE_1" SET "COLUMN_A" = UPPER ("COLUMN_A")
               ,   "COLUMN_B" = UPPER ("COLUMN_B")
               ,   "COLUMN_C" = UPPER ("COLUMN_C");
    {code} where every line above corresponds to a row fom the query.  The first line for every table will start with
    {code}
    UPDATE "TABLE_1" SET "but all the others will start with
    {code}
    and only on the last column for a given table will the statement be executed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Convert data from one table to another

    SQL> select * from A;
    empid | mon_tips | tues_tips | wed_tips | thu_tips | fri_tips
    ----------------- ------------  --------- ----------+----------
    1 | 10 | 20 | 30 | 20 | 10
    2 | 10 | 20 | 30 | 40 | 50
    i want a SQL query that will convert the data from table A into table B with the following format:
    B(empid, Day, tips) where the column Day can take the values (Mon, Tue, Wed, Thu, Fri).
    Thanks in adavnce for the replies
    sqllearner

    creaate table B as (select empid, 'MONDAY' day_1, mon_tips tips from a
    union
    select empid, 'TUESDAY' day_1, tues_tips tips from a
    union
    select empid, 'WEDNESDAY' day_1, wed_tips tips from a
    union
    select empid, 'THURSDAY' day_1, thu_tips tips from a
    union
    select empid, 'FRIDAY' day_1, fri_tips tips from a)Cheers
    Sarma.

  • Convert data in the text file to table in DBL

    Hi guys
    I wanted to convert data in text file which are in multiple rows and columns in DBL format to a table to b seen in labview as DBL format.
    I had tried looking and working at the example but in vain , i just cant produce anything
    pls help. or write me a short example..thanks

    Are you dealing with a table or an array.  For an array, just use the Read spreadsheet file from the File I/O palette.
    For a table,  you will have to convert the number to a string and setting the appropriate precision and width, then write the 2-D string array to the table.
    Message Edited by Ravens Fan on 05-20-2008 11:54 PM
    Attachments:
    Example_VI_BD6.png ‏3 KB

  • Convert data from internal table to XML file.

    Hi All,
    I am selecting data from database into one internal table.
    Now I want to convert data from internal table to xml file format and save in to my desktop. Please suggest me how I can achieve my requirement.
    Kindly reply me ASAP.

    Use this FM. SAP_CONVERT_TO_XML_FORMAT
    Check this link too -
    Re: Data Export in XML format
    XML files from ABAP programs

Maybe you are looking for