CPO XSL Transform for CPSC Form data with Grid

Does anyone have an XSL Transform worked out that conveniently parses the CPSC Form output from Service Link when it has a grid in it?
For example the data from CPSC Service Link might look like:
<root>
   <Common>
      <Action ClassID="">Some Action</Action>
      <RequisitionID>123</RequisitionID>
   </Common>
   <Attributes/>
   <FormData>
      <Dictionary.Field>Some Data</Dictionary.Field>
      <DictionaryWithGrid-1.Field1>somevalue</DictionaryWithGrid-1.Field1>
      <DictionaryWithGrid-1.Field2>someothervalue</DictionaryWithGrid-1.Field2>
      <DictionaryWithGrid-1.Field3>yetanothervalue</DictionaryWithGrid-1.Field3>
      <DictionaryWithGrid-2.Field1>somevalue2</DictionaryWithGrid-2.Field1>
      <DictionaryWithGrid-2.Field2>someothervalue2</DictionaryWithGrid-2.Field2>
      <DictionaryWithGrid-2.Field3>yetanothervalue2</DictionaryWithGrid-2.Field3>
   </FormData>
</root>
So the desired output would be
<Row>
   <Field1>somevalue</Field1>
   <Field2>someothervalue</Field2>
   <Field3>yetanothervalue</Field3>
</Row>
<Row>
   <Field1>somevalue2</Field1>
   <Field2>someothervalue2</Field2>
   <Field3>yetanothervalue2</Field3>
</Row>
I'm having difficulty getting the right XSL select when the tag is something like 'DictionaryWithGrid-#.Field'.
Thanks!

That worked great, Svetlana!  Thank you very much for the help.
I made some slight mods to make it even more portable and intuitive for XSL/XML beginners.
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<!-- Replace CHANGEME below with the name of the CPSC Form Dictionary to transform -->
<xsl:variable name="Dictionary">CHANGEME</xsl:variable>
<xsl:template match="root">
  <Table>
      <xsl:call-template name="ProcessOne">
        <xsl:with-param name="pos" select="1" />
      </xsl:call-template>
  </Table>
</xsl:template>
  <xsl:template name="ProcessOne">
    <xsl:param name="pos" />
    <xsl:variable name="RowName" select="concat($Dictionary, '-', $pos)" />
    <xsl:if test="FormData/*[starts-with(name(), $RowName)] != ''">
      <Row>
        <xsl:for-each select="FormData/*[starts-with(name(), $RowName)]">
          <xsl:if test="starts-with(name(.), $RowName)">
            <xsl:variable name="FieldName" select="substring-after(name(.), '.')"/>
            <xsl:element name="{$FieldName}">
              <xsl:value-of select="."/>
            </xsl:element>
          </xsl:if>
        </xsl:for-each>
      </Row>
      <xsl:call-template name="ProcessOne">
        <xsl:with-param name="pos" select="number($pos+1)" />
      </xsl:call-template>
    </xsl:if>
  </xsl:template>
</xsl:stylesheet>

Similar Messages

  • How can i submit form-data with acrobat pocket pc

    how can i submit form-data (http-post) on a PPC?
    how can i store the data offline?
    which submit-functions are availabe for the pocket pc reader?
    do i need ARES?
    where can i find a documentation of of the available functions for the ppc version?
    where can i fond form-samples for ppc?
    from the docu on my pocket pc:
    Submit form data using handheld devices over a wireless connection. If you are working offline, the data is temporarily stored, then submitted once a connection is established. Send forms by e-mail or directly to the destination server using a cradle or cable

    To your question regarding the Pocket PC version of Reader, I downloaded Adobe Reader for Pocket Pc 2 and installed it on my HP iPAQ . I then loaded my test PDF file onto the iPAQ. The Reader for Pocket PC preformed an email submission fine. However, I received no indication that anything happened when I tried an HTTP Post. So I think you can only do an email submission.
    In general, I have been testing to see how much I can do without the Live Cycle Reader Extensions, since for sure I will never be able to purchase them. What I have found is that for Acrobat Reader 7, the email submission works for all of the people I have asked to test it, but the HTTP Post has worked for only one of the two people who have tested it so far with Reader 7 (the one for which it worked claims that he only has Reader 7 on his computernot Acrobat).

  • Creating dynamic form data with SetValue QPAC

    I'm creating form data in a workflow process, and using it to populate a dynamic XDP with a subform.  In my test form, the subform is named "Item", with a text field named "ItemData".  Initially, I can create the form field via the SetValue QPAC and using these parameters;
    location: /process_data/form/form-data/data/xdp/datasets/data/fields/Item/ItemData
    value: "first"
    However, I need to add multiple instances of the Item subform.  For example, if I fill out the test form with 3 items and export the data to XML, the data structure comes out like this:
    first
    second
    third
    So, the question is, how do I use the SetValue QPAC to create multiple instances of the items? I've tried various locations;
    /process_data/form/form-data/data/xdp/datasets/data/fields/Item.x/ItemData
    /process_data/form/form-data/data/xdp/datasets/data/fields/Item[x]/ItemData
    /process_data/form/form-data/data/xdp/datasets/data/fields/Item/ItemData.x
    but none of them seem to work.  I know I'm probably just missing something simple.  Anybody care to fill me in on the obvious?

    Hi Clifton
    Looking back on this thread, I think you're saying that the data is eventually going to come from a MySQL database.
    In that case, our SQLPlus QPAC will do the job perfectly.
    You just specify the query, specify the repeating element:
    /process_data/form/form-data/data/xdp/datasets/data/fields/Item
    and then map columns in the result set to sub-element of the Item.
    eg mycolumn -> ItemData
    The SQLPlus qpac will create all the repeating items for you.
    Does this work for you?
    If not, please specify what you'd like to see.
    A couple of options are:
    - A setValue qpac that correctly inserts for expressions like: process_data/form/form-data/data/xdp/datasets/data/fields/Item[2] (probably difficult to do)
    - An InsertSequence qpac that takes a repeating element and a count as an input, and creates that many repeating elements. You could then refer to them using the regular SetValue qpac. (Probably easier to do.)
    - Something else. Go wild :-)
    Howard

  • Populate Tabular Form Date with Date Sitting on Form itself (i.e. :P#_Date)

    Hello,
    I have a tabular form with two date fields. I need to populate these date fields with two date fields sitting on the form itself.
    The form dates are ":P#_Start_Week" and ":P#_End_Week". These dates can change, based on the user entering the data.
    I then need to move these dates into the tabular form dates for update to a table, when the user clicks the save button on the tabular form entry. I can't seem to figure out how to make this happen.
    On the tabular form element I select Default Type PL/SQL or Function
    Default - sysdate
    This works fine, but trying to use item(application or page item name) with the form field date name does not. I'm still really new to the APEX world, so any help would be greatly appreciated.
    Thanks,
    Elaine

    Thanks to all who were in the process of getting ready to help.
    I found my answer in the threads, after reading many.
    Here is the answer:
    Re: Default a date in a tabular form
    Posted: Apr 14, 2006 3:34 AM in response to: MikeSolis Reply
    Sorry, didn't realize you are using a tabular form,try this instead :-
    Make the default type as "PL/sql source or function" and the default as "to_date(:F586_TODAYDATE)"..shown below. I made sure my computation which sets the application item returns a date.
    Display as - Text field
    Default Type :PL/SQL Expression or Function
    Default :to_date(:F586_TODAYDATE)
    Reference Table Owner - TEST_SCHEMA
    Reference Table Name -EMP
    Reference Column Name -HIREDATE
    HTH
    Vishal
    I can't believe this post is from 2006. Wow! Thanks Vishal!

  • Javascript for exporting form-data from spawned pages in csv-table

    Hello,
    I need your help with a problem concerning acrobat.
    I created a form. The user can spawn new pages from a template.
    The fields have the format Pn.templatename.fieldname, for example: P0.form.kosten1
    The user fills the form, saves the file and sends it to me.
    Now I have to get a CSV- or Excel-Table from this Data.
    The Export-Function doesn't work, because of the different fieldnames.
    Does Javascript work?
    Perhaps I can create a 2-dimensional array and then write it to a csv-file??
    Has anyone a good Idea?
    Thank you for helping.
    Many greetings,
    Thomas

    The only way I've found to do this is to open the form in Acrobat, click Forms, mouse over Manage Form Data, then click Export Data. Your only options are to save as .xml or .xdp. I saved my data as .xml. I was then able to import the .xml file into excel by clicking Data, mousing over xml, clicking Import... and browsing to the Acrobat generated .xml file. I know this is convoluted but it's the only way I've found to get the data into a spreadsheet. Acrobat exports the data as filename_data.xml, i.e. a form named contacts will export it's data as contacts_data.xml. Be aware, I've only tested this on a form that had a table in it and nothing else. If your table is part of a form with other fields in it I have no idea how the other data will look after exporting.

  • How to change connection string for a form created with b1de

    Hi all
    i've created a form using the Code Generator tool ob B1DE
    My question is how can i set the connection string to a different server and database. doing so after the creation wizard has finished?

    Hi,
    Why do you need to change the connection string? What are you calling "connection string for a form"???
    The only connection string I now about is the one used to connect to the UI API... and this one is fixed for all apps in debug mode and given as parameter when your addon is registered in B1.
    The connection string is filled in the code of your generated addon.
    Please go to the main class of your addon, in the main method you have the following code where the connection string is filled either with the command line parameters (release mode) or with the fixed value given by SAP. This code doesn't need to be changed...
            public static void Main()
                int retCode = 0;
                string connStr = "";
                bool diRequired = true;
                // CHANGE ADDON IDENTIFIER BEFORE RELEASING TO CUSTOMER (Solution Identifier)
                string addOnIdentifierStr = "";
                if ((System.Environment.GetCommandLineArgs().Length == 1)) {
                    connStr = B1Connections.connStr;
                else {
                    connStr = System.Environment.GetCommandLineArgs().GetValue(1).ToString();
                try {
                    // INIT CONNECTIONS
                    retCode = B1Connections.Init(connStr, addOnIdentifierStr, diRequired);
    Regards
    Trinidad.

  • Sql sript for Insert of data with repeating values

    It has been a long long time since I had to do write and use any SQL scripts, please forgive the question. I used to use a script to insert values into a table as part of my job. I have forgotten what the script I used was and since lost all my Oracle note books and other DBA material.
    I did a search and went through 30 pages of results, I didn't see what I'm looking for.
    The data is from one large file that is appended at the end and sometimes updated somewhere in the middle of the set which is considered new data. I am not concern with getting the data out of the file, I got that handled but the insert into the table - transactions - is where I'm lost.
    I used to use a script to load the data, about 6 years ago, and it would load the file, exclude the data that was already in the table and insert the new data and the data with the changes.
    The data columns are date, time, reference, transaction code, location, debit amount, fee amount, balance.
    The date repeats but the time and reference values are unique.
    Any help with this script is appreciated.

    Hi,
    welcome to the forum..!
    You can use Oracle's merge statement to (update + insert) data into a table ... if the data exists update it with the new values and if it does not, then insert it.
    Here's a link to get you started...
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9016.htm
    Since, the data is from a file, you could create an external table on the file and directly do a select from the file.
    MERGE INTO bonuses D
       USING (SELECT employee_id, salary, department_id FROM employees
       WHERE department_id = 80) S
       ON (D.employee_id = S.employee_id)
       WHEN MATCHED THEN UPDATE SET D.bonus = D.bonus + S.salary*.01
         DELETE WHERE (S.salary > 8000)
       WHEN NOT MATCHED THEN INSERT (D.employee_id, D.bonus)
         VALUES (S.employee_id, S.salary*0.1)
         WHERE (S.salary <= 8000);in the above example, the
    SELECT employee_id, salary, department_id FROM employeesis the source data. instead of loading the file into a temporary table and then merge into the target table , you could read from <<<external_table_on_your_file>> and then do a merge into the target table.
    http://www.oracle.com/technology/products/oracle9i/daily/sept19.html
    If you encounter any problems, please post the full description of your error.
    Thanks,
    Rajesh.
    Please mark this/any other answer as helpful or answered if it is so. If not, provide additional details/feedback.
    Always try to provide create table and insert statements to help the forum members help you better.

  • Is it possible to make a delta load for a Master data with Standard DS

    I have a full load bringing huge data for master data with standard datasource.
    I want to run a delta due to huge no. of records but when I create a new Infopackage it dont give a option for delta update.
    Are delta loads specific to only standard or customized DS's or any other reason behind that ?

    I kind of understand what you are asking about, but I am unclear as to how it pertains to our BO SDK.
    You are wanting to find the differences between a large dataset and another large dataset.
    I am not sure what an Infopackage is.
    Are you using the BO Enterprise SDK or some other product?
    Jason

  • How to retain form data with cfpdf flatten option

    I created an intertactive form from an existing pdf using
    Acrobat 8.0/Live Cycle designer. Now I am trying to use it in my
    application where I use cfpdfform tag to first populate the pdf,
    and then create a flattened copy of the form using cfpdf
    action="wrtite" flatten="yes" command. But when I flatten the form,
    the form data is lost. This does not happen with other government
    forms like Form I-9 or W-4 that could be downloaded as interactive
    forms from their respective sites.
    I came across this article through a Google search
    http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_p-q_02.html.
    If you scroll down about half the page you will see this:
    "You can use the cfpdf tag to assemble interactive PDF form
    files into a single PDF document and flatten forms created in
    Acrobat (by using the flatten attribute with the write action);
    however, to process PDF form data, use the cfpdfform and related
    tags. You cannot use the cfpdf tag to flatten forms created in
    Adobe LiveCycle Designer ES."
    This is confusing - why can't the forms created in LiveCycle
    be flattened? What other tools we have to create interactive forms
    that can be flattened with form data?
    Please assist me with your pointers and responses. Would
    appreciate an early reply.
    Thanks very much.
    Raj

    Here's how I did it.  LiveCycle form does work in ColdFusion.  It even includes an image wich works untill I flatten the form.

  • Updating Tag Name using Adobe Professional for PDF form created with Tags in Adobe Livecycl Designer

    I have created a form using Adobe Livecycle Designer. These PDF forms have Tags on them when created and generted from Adobe livecycle designer.
    I am able to open the PDF form in the Adobe Profesional 9.0.
    I want to edit / Update the Tags on the PDF form using Adobe Professional 9.0. I am not seeing any option to view the Tags on the forms so that I can edit it while I have open the PDF in the Adobe Professional. The PDF document was created in Adobe Livecycle Designer 9.0
    Please let me know how can I edit the Tags on a PDF form using Adobe Professional for a Form that was created using Adobe livecycle and tags added.
    Thanks,
    Siva.

    Edit the tags in Adobe Livecycle Designer.

  • ETA for a JavaFX Data Table / Grid

    Hi All,
    Some of the posts in the forum seem to suggest that there is a JavaFX Data Table component in the works , any word on when we'll see something ? I'm looking for the following features ..
    * Columns of different widths
    * Columns that the user can resize at runtime
    * Columns that the user can reorder at runtime
    * Columns that can be filtered(removed) at runtime
    * Customizable column headers
    * Ability to use a custom cell rendered for any column to display data other than text
    * Support for sorting the data by clicking on a column
    * Pagination
    * Runtime column selection
    * Background row highlighting
    Until a JavaFX data table arrives is it a recommended approach to use something like JXTable ?
    Thanks
    --gordon                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi,
      I think this is because of memory overflow.
      You can create two screens for this, in on screen (Overview) screen, restrict the data selection.
      In detail screen display the data.
    With regards,
    Vamsi

  • Creating Simple transformation for an XML data having deep structure

    Hi
    I have the following XML structure..
    <REQUESTS>
      <REQUESTNAME>REQ123</REQUESTNAME>
      <REQUESTID>1234</REQUESTID>
      <CITY>NEWYORK</CITY>
      <ZIPCODE>123456</ZIPCODE>
    <COMPETENCIES>
       <LANGUAGES>
         <COMPETENCY>
            <SKILL>SAP</SKILL>
            <PROFICIENCY>TEST</PROFICIENCY>
            <SKILL>JAVA</SKILL>
            <PROFICIENCY>TEST123</PROFICIENCY>
    (here we may have any number of records for SKILL&PROFICIENCY...)*
    </COMPETENCIES>
       </LANGUAGES>
         </COMPETENCY>
    </REQUESTS>
    My requirement is to read the above data from an URL and push it into an internal table.
    For this I'm trying to use Simple transformations but I'm facing difficulty in doing this.
    Can you pl. guide me how to create the transformation and the corresponding code for this.
    Best Regards
    Anil

    Hi
    Here is the actual XML structure..
    - <REQUEST>
      <COUNTRY />
      <ADDRESS />
      <CITY />
      <ASSIGNTYPE>IP</ASSIGNTYPE>
      <CHARGETYPE>CH</CHARGETYPE>
      <REMOTEALLOWED>Y</REMOTEALLOWED>
      <SALESRATE>EUR</SALESRATE>
      <SECURITY>NO</SECURITY>
      <TRAVELEXP>Y</TRAVELEXP>
      <MAXDAILYRATE />
      <CREDENTIALS />
      <EXPENDDATE />
      <NEWENDDATE />
      <NEWEXPENDDATE />
      <REPLYBEFORE>2010-11-30</REPLYBEFORE>
      <STARTDATE>2010-01-01</STARTDATE>
      <ENDDATE>2010-12-31</ENDDATE>
      <GCMTYPE>PM</GCMTYPE>
      <GCMLEVELFROM>02</GCMLEVELFROM>
      <GCMLEVELTO>08</GCMLEVELTO>
      <LOCATION>FR43</LOCATION>
      <MOBILITY>04</MOBILITY>
      <ZIPCODE />
    - <COMPETENCIES>
    - <LANGUAGES>
    - <COMPETENCY>
      <SKILL>01106034</SKILL>
      <PROFICIENCY>005103</PROFICIENCY>
      </COMPETENCY>
      </LANGUAGES>
    - <ACTIVITIES>
    - <COMPETENCY>
      <SKILL>01105500</SKILL>                            
      <PROFICIENCY>004507</PROFICIENCY>
      </COMPETENCY>
      </ACTIVITIES>
    - <BUSINESS>
    - <COMPETENCY>
      <SKILL>01105729</SKILL>
      <PROFICIENCY>004605</PROFICIENCY>
      </COMPETENCY>
      </BUSINESS>
    - <INDUSTRIES>
    - <COMPETENCY>
      <SKILL>01105491</SKILL>
      <PROFICIENCY>004901</PROFICIENCY>
      </COMPETENCY>
      </INDUSTRIES>
    - <METHODS>
    - <COMPETENCY>
      <SKILL>01105591</SKILL>
      <PROFICIENCY>004805</PROFICIENCY>
      </COMPETENCY>
      </METHODS>
    - <OFFERINGS>
    - <COMPETENCY>
      <SKILL>01105840</SKILL>
      <PROFICIENCY>005002</PROFICIENCY>
      </COMPETENCY>
      </OFFERINGS>
    - <PRODUCTS>
    - <COMPETENCY>
      <SKILL>01107304</SKILL>
      <PROFICIENCY>004703</PROFICIENCY>
      </COMPETENCY>
      </PRODUCTS>
      </COMPETENCIES>
      <CANDIDATES />
      </REQUEST>
    Here..... <SKILL></SKILL>   <PROFICIENCY></PROFICIENCY>  can be more than 1 entry...
    For this I have created a simple transformation like below..
    I have used the tcode 'XSLT_TOOL '..
    In SE11 I have created a Table type 'ZCOMPETENCIES' which is having  a line type 'ZLANGS'.
    ZLANGS is a structure which has another structure called 'ZCOMPETENCY' and this 'ZCOMPETENCY' is having fields
    SKILL & PROFICIENCY.
    I have used the wizard button which u can find  'XSLT_TOOL '.. and provided the table type ZCOMPETENCIES'  and it has automatically created the following transformation...
    <?sap.transform simple?>
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates" xmlns:ddic="http://www.sap.com/abapxml/types/dictionary" xmlns:def="http://www.sap.com/abapxml/types/defined">
      <tt:root name="ROOT" type="?"/>
      <tt:root name="COMPETENCIES" type="ddic:ZCOMPETENCIES"/>
      <tt:template>
        <COMPETENCIES>
          <tt:loop ref=".COMPETENCIES">
            <ZLANGS>
              <COMPETENCY>
                <SKILL tt:value-ref="COMPETENCY.SKILL"/>
                <PROF tt:value-ref="COMPETENCY.PROF"/>
              </COMPETENCY>
            </ZLANGS>
          </tt:loop>
        </COMPETENCIES>
      </tt:template>
    </tt:transform>
    I have written following code to get the data
    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.
    GET REFERENCE OF gt_person INTO gs_result_xml-value.
    gs_result_xml-name = 'COMPETENCIES'.
    APPEND gs_result_xml TO gt_result_xml.
    TRY.
        CALL TRANSFORMATION ZTEST_TRAN
        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.
    Please let me know if you need any further details..
    Best Regards
    Anil

  • Problem sync Satellite Forms data with Oracle 8i Lite through iConnect Consolidator.

    I receive following exception in the hotsync log:
    java.lang.Exception: Compose raw metadata not implemented for SMSE
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at oracle.lite.sync.palm.SMRL4PRecord.composeRawMetaData(SMRL4PRecord.java:126)
    at oracle.lite.sync.HeliosSession.<init>(Compiled Code)
    at oracle.lite.sync.HotSyncSession.RunTime(Compiled Code)
    OK Oracle with 1 message(s)
    This is when I after installed the satellite forms performes a sync.
    I use PalmV with PalmOS 3.3, performes the sync with HotSync through iConnect Consolidator for Oracle 8i Lite 4.0.0.2.0
    In the Satellite Forms App Designer I have check the Oracle Lite option in the property form.
    This happends for both the sample forms and the one I have created.
    I use the Satellite Form 3.0 beta 2, is there a new release and where can I find it ?
    Anyone with any ideas to solve this ?
    Thanks in advance !
    /Patrik

    Hello Patrik,
    Did you resolved this problem ? I have the same error message. Please, let me know what i can do.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Patrik Strid ():
    I receive following exception in the hotsync log:
    java.lang.Exception: Compose raw metadata not implemented for SMSE
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at oracle.lite.sync.palm.SMRL4PRecord.composeRawMetaData(SMRL4PRecord.java:126)
    at oracle.lite.sync.HeliosSession.<init>(Compiled Code)
    at oracle.lite.sync.HotSyncSession.RunTime(Compiled Code)
    OK Oracle with 1 message(s)
    <HR></BLOCKQUOTE>
    null

  • Syntax for querying between dates with ADO

    Hello,
    I am connecting to Oracle tables using ADO in Microsoft Access. I am not familiar with Oracle Sql. I am trying to execute the following query string but am not retrieving and records:
    strSql = "SELECT COUNT(*) " _
    & "FROM CCC2.CASE_EPRP WHERE CALL_DATE >= '1/1/2002' " _
    & "AND CALL_DATE <= '2/1/2002'"
    I can retrieve a record count if I only have the first date, but if I use the date range above the query returns zero records even though there are records for that date range. Could someone explain the correct way to write this query?
    Thanks,
    Rich

    You really don't want to rely on implicit string to date conversion ever. Oracle will use your NLS date settings to do the conversion, but different users (and different databases) may have this set differently, so one user might have '2/1/2002' convert to February 1, 2002 while another user might have it convert to January 2, 2002. A third user might not be able to convert the string at all.
    The proper way to do this is to use either Oracle syntax
    "where call_date >= to_date( '1/1/2002', 'MM/DD/YYYY' )
    and call_date <= to_date( '2/1/2002', 'MM/DD/YYYY' )"
    or to use the ODBC date escape sequence, {d }, to create the dates.
    If this isn't the problem, there may be issues because Oracle dates have a time component. If you don't specify a time, Oracle will default to midnight, so any call_date records after 12:00am on 2/1/2002 won't be found.
    Justin

  • XSL transform question from XML date datatype to SQL date datatype

    Just to give an idea, I am reading some employee information in a CSV format and I have created the fileadapter to read it and parse it into coherent information where each comma separated value corresponds to a column in an employee table. One of the columns is of the date object in the database.
    So my my variable is created with a list of employees and then fed into the invoke that calls a dbadapter that does the insert. I am using a transformation to get the values from one variable into the other simply because of namespace conflicts. However the xml date will not match the sql date object as to be expected...but how do I work around it? I have a few ideas but I am not sure they are worth mentioning.
    Any suggestions?

    @@Version : ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Microsoft SQL Server 2012 - 11.0.5058.0 (X64)
        May 14 2014 18:34:29
        Copyright (c) Microsoft Corporation
        Developer Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor)
    (1 row(s) affected)
    Compatibility level is set to 110 .
    One of the limitation states - XML columns with a depth of more than 128 nested nodes
    How do i verify this ? Thanks .
    Rajkumar Yelugu

Maybe you are looking for

  • Why this broken c++ code works?

    I'm testing some flascc code, and I'm trying to trow some errors, but it seems that my tests just return NULL or zero, and never stop the execution, and I think this is not desired. For example: Error *errorClass = NULL; int myVar = errorClass->foo()

  • How to use iBook for sharing internet via airport card... can it be done?

    The title says most of it all. I want to share the internet coming from the wall through the airport card in my iBook. I've made it work, however I'm concerned about doing it securely. Can it be done securely? If so, how? I've read in the help files

  • Received new email and cant delete it or send new ones at all now

    Hi, I have tried about a dozen times to delete junk mail from inbox. Usually they go into the mail trash bin, but not now. I tried dragging them to the desktop waste bin and again no joy. I went into mail preferences and . In Mail, open Preferences f

  • PDF output : cfdocumentitem type="header"

    PDF output : <cfdocumentitem type="header"> Is it possible to start header output from page 2? Thanks for helping.

  • Time Capsule help setting up PS3 and game adapter

    I just bought a time capsule to use as my modem and now my existing game adapter will no longer connect my PS3 to the internet. I have no idea how to fix this. Support forums tell me to type 198.250.1.1 or something like that in the address bar of sa