Converting pl/sql structure (record) to a string

I need to convert a structure to a string, does anyone know how to do this?
e.g.
TYPE Msg IS RECORD /* record to store message info */
record_type VARCHAR2(3),
field1 VARCHAR2(10),
my_dept_nbr dept.dept_nbr%TYPE);
My_Msg Msg;
My_Msg.record_type := 'ABC';
My_Msg.field1 := 'whatever';
My_Msg.my_dept_nbr := 13;
Now I want to assign My_Msg to a string!!!

Not really.
I wanr to define a series of structures in a common package spec and use the definitions in other packages that will populated them, some of these messages can be complex and large.
I then need to pass the messages as a string vis MQ to another applications.
I would like to perform an assignment such as:
My_String := My_Msg;
or My_String := to_char(My_Msg);
or My_string := fncStructureToString(My_Msg);

Similar Messages

  • Error "Conversion failed when converting date and/or time from character string" to execute one query in sql 2008 r2, run ok in 2005.

    I have  a table-valued function that run in sql 2005 and when try to execute in sql 2008 r2, return the next "Conversion failed when converting date and/or time from character string".
    USE [Runtime]
    GO
    /****** Object:  UserDefinedFunction [dbo].[f_Pinto_Graf_P_Opt]    Script Date: 06/11/2013 08:47:47 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE   FUNCTION [dbo].[f_Pinto_Graf_P_Opt] (@fechaInicio datetime, @fechaFin datetime)  
    -- Declaramos la tabla "@Produc_Opt" que será devuelta por la funcion
    RETURNS @Produc_Opt table ( Hora datetime,NSACOS int, NSACOS_opt int)
    AS  
    BEGIN 
    -- Crea el Cursor
    DECLARE cursorHora CURSOR
    READ_ONLY
    FOR SELECT DateTime, Value FROM f_PP_Graficas ('Pinto_CON_SACOS',@fechaInicio, @fechaFin,'Pinto_PRODUCTO')
    -- Declaracion de variables locales
    DECLARE @produc_opt_hora int
    DECLARE @produc_opt_parc int
    DECLARE @nsacos int
    DECLARE @time_parc datetime
    -- Inicializamos VARIABLES
    SET @produc_opt_hora = (SELECT * FROM f_Valor (@fechaFin,'Pinto_PRODUC_OPT'))
    -- Abre y se crea el conjunto del cursor
    OPEN cursorHora
    -- Comenzamos los calculos 
    FETCH NEXT FROM cursorHora INTO @time_parc,@nsacos
    /************  BUCLE WHILE QUE SE VA A MOVER A TRAVES DEL CURSOR  ************/
    WHILE (@@fetch_status <> -1)
    BEGIN
    IF (@@fetch_status = -2)
    BEGIN
    -- Terminamos la ejecucion 
    BREAK
    END
    -- REALIZAMOS CÁLCULOS
    SET @produc_opt_parc = (SELECT dbo.f_P_Opt_Parc (@fechaInicio,@time_parc,@produc_opt_hora))
    -- INSERTAMOS VALORES EN LA TABLA
    INSERT @Produc_Opt VALUES (@time_parc,@nsacos, @produc_opt_parc)
    -- Avanzamos el cursor
    FETCH NEXT FROM cursorHora INTO @time_parc,@nsacos
    END
    /************  FIN DEL BUCLE QUE SE MUEVE A TRAVES DEL CURSOR  ***************/
    -- Cerramos el cursor
    CLOSE cursorHora
    -- Liberamos  los cursores
    DEALLOCATE cursorHora
    RETURN 
    END

    You can search the forums for that error message and find previous discussions - they all boil down to the same problem.  Somewhere in your query that calls this function, the code invoked implicitly converts from string to date/datetime.  In general,
    this works in any version of sql server if the runtime settings are correct for the format of the string data.  The fact that it works in one server and not in another server suggests that the query executes with different settings - and I'll assume for
    the moment that the format of the data involved in this conversion is consistent within the database/resultset and consistent between the 2 servers. 
    I suggest you read Tibor's guide to the datetime datatype (via the link to his site below) first - then go find the actual code that performs this conversion.  It may not be in the function you posted, since that function also executes other functions. 
    You also did not post the query that calls this function, so this function may not, in fact, be the source of the problem at all. 
    Tibor's site

  • SAP query error - 1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Conversion failed when converting date and/or time from character string.  'Received Alerts' (OAIB)

    SAP query error - 1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Conversion failed when converting date and/or time from character string.  'Received Alerts' (OAIB)
    SELECT    
    CASE WHEN T0.DocStatus = 'O' THEN 'OPEN'
    WHEN T0.DocStatus = 'C' THEN 'CLOSED'  END  AS 'Document Status',
    T0.DocDate AS 'Posting Date',
    T0.DocNum AS 'Doc.No',
    T0.NumAtCard,
    T0.TransId AS 'Trans. No.',
    T0.Comments AS 'Remarks',
    T0.CardCode AS 'Offset Acct',
    T0.CardName AS 'Offset Acct Name',
    sum(T0.DocTotal) + (T0.WTSum) as 'DocTotal',
    T3.DueDate AS 'Cheque Date',
    T3.CheckSum AS 'Amount'
    FROM         ODPO AS T0 LEFT OUTER JOIN
                          VPM2 AS T1 ON T0.ObjType = T1.InvType AND T0.DocEntry = T1.DocEntry LEFT OUTER JOIN
         OVPM AS T2 ON T2.DocEntry = T1.DocNum LEFT OUTER JOIN
                          VPM1 AS T3 ON T2.DocEntry = T3.DocNum
    where T0.DocDate>='[%0]' and T0.DocDate<='[%1]'

    Hi,
    Try this:
    SELECT   
    CASE WHEN T0.DocStatus = 'O' THEN 'OPEN'
    WHEN T0.DocStatus = 'C' THEN 'CLOSED'  END  AS 'Document Status',
    T0.DocDate AS 'Posting Date',
    T0.DocNum AS 'Doc.No',
    T0.NumAtCard,
    T0.TransId AS 'Trans. No.',
    T0.Comments AS 'Remarks',
    T0.CardCode AS 'Offset Acct',
    T0.CardName AS 'Offset Acct Name',
    sum(T0.DocTotal) + (T0.WTSum) as 'DocTotal',
    T3.DueDate AS 'Cheque Date',
    T3.CheckSum AS 'Amount'
    FROM         ODPO  T0 LEFT OUTER JOIN
                          VPM2  T1 ON T0.ObjType = T1.InvType AND T0.DocEntry = T1.DocEntry
    LEFT OUTER JOIN
         OVPM  T2 ON T2.DocEntry = T1.DocNum LEFT OUTER JOIN
                          VPM1  T3 ON T2.DocEntry = T3.DocNum
    where T0.DocDate >= '[%0]' and T0.DocDate <='[%1]'
    group by T0.DocStatus,T0.DocDate ,
    T0.DocNum ,
    T0.NumAtCard,
    T0.TransId ,
    T0.Comments ,
    T0.CardCode,
    T0.CardName ,
    T0.WTSum ,
    T3.DueDate ,
    T3.CheckSum
    Thanks & Regards,
    Nagarajan

  • How to execute an SQL query present in a string inside an ABAP program?

    hello,
    How to execute an SQL query present in a string inside an ABAP program

    Raut,
    You can execute Native SQl statements.
    Ex: To use a Native SQL statement, you must precede it with the EXEC SQL statement, and follow it with the ENDEXEC statement as follows:
    EXEC SQL [PERFORMING <form>].
      <Native SQL statement>
    ENDEXEC.
    There is no period after Native SQL statements. Furthermore, using inverted commas (") or an asterisk (*) at the beginning of a line in a native SQL statement does not introduce a comment as it would in normal ABAP syntax. You need to know whether table and field names are case-sensitive in your chosen database.
    In Native SQL statements, the data is transported between the database table and the ABAP program using host variables. These are declared in the ABAP program, and preceded in the Native SQL statement by a colon (:). You can use elementary structures as host variables. Exceptionally, structures in an INTO clause are treated as though all of their fields were listed individually.
    If the selection in a Native SQL SELECT statement is a table, you can pass it to ABAP line by line using the PERFORMING addition. The program calls a subroutine <form> for each line read. You can process the data further within the subroutine.
    As in Open SQL, after the ENDEXEC statement, SY-DBCNT contains the number of lines processed. In nearly all cases, SY-SUBRC contains the value 0 after the ENDEXEC statement. Cursor operations form an exception: After FETCH, SY-SUBRC is 4 if no more records could be read. This also applies when you read a result set using EXEC SQL PERFORMING.
    EXEC SQL PERFORMING loop_output.
      SELECT connid, cityfrom, cityto
      INTO   :wa
      FROM   spfli
      WHERE  carrid = :c1
    ENDEXEC.
    Pls. Mark If useful

  • Return code 4 when converting field GN_PAR_SSY in record

    Hi friends,
    This is very much urgent.
    I am getting error
    "Record 1 :Return code 4 when converting field GN_PAR_SSY in record " while extracting customer text through 0customer_text.
    In the transfer rule there is nothing assigned to the infobjects 0GN_PAR_SSY.
    My source system is EEC 6.0.
    I am not getting this error on development and quality servers.
    Regards,
    Sane M. V.

    Hi mahendra , just have a look on the routine , for this infobject.
    PROGRAM CONVERSION_ROUTINE.
    Type pools used by conversion program
    TYPE-POOLS: RS, RSARC, RSARR, SBIWA, RSSM.
    Declaration of transfer structure (selected fields only)
    TYPES: BEGIN OF TRANSFER_STRUCTURE ,
      InfoObject 0PLANT: CHAR - 000004
      WERKS(000004) TYPE C,
      InfoObject 0POSTAL_CD: CHAR - 000010
      PSTLZ(000010) TYPE C,
      InfoObject 0PURCH_ORG: CHAR - 000004
      EKORG(000004) TYPE C,
      InfoObject 0SALESORG: CHAR - 000004
      VKORG(000004) TYPE C,
      InfoObject 0FACTCAL_ID: CHAR - 000002
      FABKL(000002) TYPE C,
      InfoObject 0COUNTRY: CHAR - 000003
      LAND1(000003) TYPE C,
      InfoObject 0REGION: CHAR - 000003
      REGIO(000003) TYPE C,
      InfoObject 0COUNTY_CDE: CHAR - 000003
      COUNC(000003) TYPE C,
      InfoObject 0DISTR_CHAN: CHAR - 000002
      VTWEG(000002) TYPE C,
      InfoObject 0RT_CUSTPL: CHAR - 000010
      KUNNR(000010) TYPE C,
      InfoObject 0PLANTCAT: CHAR - 000001
      VLFKZ(000001) TYPE C,
      InfoObject 0SALES_DIST: CHAR - 000006
      BZIRK(000006) TYPE C,
      dummy field to avoid syntax error
        $dummy(1) type c,
    END OF TRANSFER_STRUCTURE .
    Global code used by conversion rules
    $$ begin of global - insert your declaration only below this line  -
    DATA:   l_s_errorlog TYPE rssm_s_errorlog_int,
            l_text TYPE string.
    $$ end of global - insert your declaration only before this line   -
          FORM COMPUTE_GN_R3_SSY
    Compute value of InfoObject 0GN_R3_SSY
    in communication structure /BIC/CS0PLANT_ATTR
    Technical properties:
        field name      = GN_R3_SSY
        data element    = /BI0/OIGN_R3_SSY
        data type       = CHAR
        length          = 000002
        decimals        = 000000
        ABAP type       = C
        ABAP length     = 000004
        reference field =
    Parameters:
    -->  RECORD_NO       Record number
    -->  TRAN_STRUCTURE  Transfer structure
    <--  RESULT          Return value of InfoObject
    <->  G_T_ERRORLOG    Error log
    <--  RETURNCODE      Return code (to skip one record)
    <--  ABORT           Abort code (to skip whole data package)
    FORM COMPUTE_GN_R3_SSY
      USING    RECORD_NO LIKE SY-TABIX
               TRAN_STRUCTURE TYPE TRANSFER_STRUCTURE
               G_S_MINFO TYPE RSSM_S_MINFO
      CHANGING RESULT TYPE /BI0/OIGN_R3_SSY
               G_T_ERRORLOG TYPE rssm_t_errorlog_int
               RETURNCODE LIKE SY-SUBRC
               ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel datapackage
    $$ begin of routine - insert your code only below this line        -
    DATA: l_s_errorlog TYPE rssm_s_errorlog_int.
      CALL FUNCTION 'RSDG_ID_GET_FROM_LOGSYS'
        EXPORTING
          i_source_system = G_S_MINFO-LOGSYS
        IMPORTING
          e_soursysid     = RESULT
        EXCEPTIONS
          id_not_found    = 1.
      IF sy-subrc <> 0.
        RETURNCODE = 4.
        MESSAGE e087(r7) WITH G_S_MINFO-LOGSYS INTO l_text.
        MOVE-CORRESPONDING syst TO l_s_errorlog.
        l_s_errorlog-record = RECORD_NO.
        APPEND l_s_errorlog TO g_t_errorlog.
      ABORT = 1.
      ENDIF.
    $$ end of routine - insert your code only before this line         -
    ENDFORM.
          FORM INVERT_GN_R3_SSY
          Inversion of selection criteria for InfoObject 0GN_R3_SSY
          This subroutine needs to be implemented only for SAP RemoteCubes
          (for better performance) and for the Report/Report Interface
          (drill through).
    -->  I_RT_CHAVL_CS       Ranges table for current InfoObject
    -->  I_THX_SELECTION_CS  Selection criteria for all other InfoObjects
    <--  C_T_SELECTION       Selection criteria for fields of
                              transfer structure
    <--  E_EXACT             Flag: Inversion was exact
    FORM INVERT_GN_R3_SSY
      USING    I_RT_CHAVL_CS      TYPE RSARC_RT_CHAVL
               I_THX_SELECTION_CS TYPE RSARC_THX_SELCS
      CHANGING C_T_SELECTION      TYPE SBIWA_T_SELECT
               E_EXACT            TYPE RS_BOOL.
    $$ begin of inverse routine - insert your code only below this line-
      DATA:
        L_S_SELECTION LIKE LINE OF C_T_SELECTION.
    An empty selection means all values
      CLEAR C_T_SELECTION.
    Selection of all values may be not exact
      E_EXACT = RS_C_FALSE.
    $$ end of inverse routine - insert your code only before this line -
    ENDFORM.
    Hope it helps , assign pts if helpful

  • Conversion failed when converting date and/or time from character string

    Hi experts,
    I'm trying running a query in Microsoft Query but it gives the following error message:
    "conversion failed when converting date and/or time from character string"
    when asks me the data I'm inserting 31-01-2014
    i've copy the query form the forum:
    SELECT T1.CardCode, T1.CardName, T1.CreditLine, T0.RefDate, T0.Ref1 'Document Number',
         CASE  WHEN T0.TransType=13 THEN 'Invoice'
              WHEN T0.TransType=14 THEN 'Credit Note'
              WHEN T0.TransType=30 THEN 'Journal'
              WHEN T0.TransType=24 THEN 'Receipt'
              END AS 'Document Type',
         T0.DueDate, (T0.Debit- T0.Credit) 'Balance'
         ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')<=-1),0) 'Future'
         ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>=0 and DateDiff(day, T0.DueDate,'[%1]')<=30),0) 'Current'
         ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>30 and DateDiff(day, T0.DueDate,'[%1]')<=60),0) '31-60 Days'
         ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>60 and DateDiff(day, T0.DueDate,'[%1]')<=90),0) '61-90 Days'
         ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>90 and DateDiff(day, T0.DueDate,'[%1]')<=120),0) '91-120 Days'
         ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>=121),0) '121+ Days'
    FROM JDT1 T0 INNER JOIN OCRD T1 ON T0.ShortName = T1.CardCode
    WHERE (T0.MthDate IS NULL OR T0.MthDate > ?) AND T0.RefDate <= ? AND T1.CardType = 'C'
    ORDER BY T1.CardCode, T0.DueDate, T0.Ref1

    Hi,
    The above error appears due to date format is differnt from SAP query generator and SQL server.
    So you need convert all date in above query to SQL server required format.
    Try to convert..let me know if not possible.
    Thanks & Regards,
    Nagarajan

  • Reading files and converting into xml structure

    Hi,
    In my application a client requests for the folder structure information to a server through RMI. The server needs to read files and folders on local machine and convert it into some structure (I am thinking of using xml) and send it back. For eg: I am planning to have Server send back something like:
    <directory name = "parentdirectory">
    <file name = "abc.jpg"/>
    <file name = "def.bmp"/>
    <directory" name = "subdirectory">
    <file name = "hij.jpg"/>
    <file name = "klm.bmp"/>
    </directory>
    </directory>
    It is just the names of the files I am interested in and not the contents. Is this a good approach of sending back the data as a string containg xml definition. Is there any better appproach in terms of performance, memory etc? I am currently planning on using DOM for construction of this structure. Is there a source code for reading and converting the folder structure into xml. Just for your information, the clients gets this information and shows it as a tree structure on the GUI.
    Thanks!!!!

    Is this a good approach of sending back the data as a string containg xml definition. It'll work.
    An alternative, more direct approach is to build a memory representation and send this as argument/return value of an RMI call. You'd need to write classes MyDirectory and MyFile; MyFile has just a name; MyDirectory has a name and a collection of MyDirectory and one of MyFile. Make these classes implement Serializable and you can send them over RMI.
    The effort to write those trivial classes would be less than to implement XML encoding/decoding, and also in terms of runtime performance and memory it will be hard to beat Java's serialization with anything XML-based. In this case I doubt performance/memory are relevant considerations though.
    If for some reason I'd go for sending XML Strings anyway, I wouldn't do the encoding/decoding myself; I'd use XStream to convert Java classes to/from XML and still end up writing the above two classes and be done.
    Sorry if you wanted a simple yes or no :-)

  • Converting OBJECT Type into RECORD Type

    folks,
    Is there a way to Convert a OBJECT Type into a RECORD Type in Oracle PL/SQL, Because i have a stored procedure with RECORD Type as a IN parameter and as we know that we JDBC doesn't support calling or returning RECORD Types , So i was thinking of sending a OBJECT type and convert that to a RECORD type,
    I appreciate any help with the code or point to the documentation,
    thanks
    KM

    folks,
    Is there a way to Convert a OBJECT Type into a RECORD Type in Oracle PL/SQL, Because i have a stored procedure with RECORD Type as a IN parameter and as we know that we JDBC doesn't support calling or returning RECORD Types , So i was thinking of sending a OBJECT type and convert that to a RECORD type,
    I appreciate any help with the code or point to the documentation,
    thanks
    KM

  • Converting Oracle XML Query Result in Java String by using XSU

    Hi,
    I have a problem by converting Oracle XML Query Result in Java
    String by using XSU. I use XSU for Java.
    For example:
    String datum=new OracleXMLQuery(conn,"Select max(ps.datum) from
    preise ps where match='"+args[0]+"'");
    String datum1=datum;
    I become the following error:
    Prototyp.java:47: Incompatible type for declaration. Can't
    convert oracle.xml.sql.query.OracleXMLQuery to java.lang.String.
    Can somebody tell me a method() for converting to solve my
    problem??????
    Thanks

    Hmmm.. Pretty basic just look at the example:
    OracleXMLQuery qry = new OracleXMLQuery(conn,"Select max(ps.datum) from preise ps where match='"+args[0]+"'");
    String xmlString = qry.getXMLString();
    Hi,
    I have a problem by converting Oracle XML Query Result in Java
    String by using XSU. I use XSU for Java.
    For example:
    String datum=new OracleXMLQuery(conn,"Select max(ps.datum) from
    preise ps where match='"+args[0]+"'");
    String datum1=datum;
    I become the following error:
    Prototyp.java:47: Incompatible type for declaration. Can't
    convert oracle.xml.sql.query.OracleXMLQuery to java.lang.String.
    Can somebody tell me a method() for converting to solve my
    problem??????
    Thanks

  • Re: SQL structure reorganisation

    HI Experts,
    i am working on ECC 6.0 using win 2k3 64 bit with sql 2005 server as database.
    the problem is, i have deleted to clients from my server to create some space for a new client copy but after deletion of that two client i didnt get the space acquired by those client. one of my colleague suggested that reorganization of sql structure can rectify this problem, but i dont know how to do that.
    Please can anyone tell me which query is used for that or how can i recover the space which is still occupied by the client i have deleted.
    thanks in advance
    Akshit Sharma

    Hello,
    this statement is not true:
    > But data compression is a totally different thing and also it is not recommended because it makes database works slow.
    Database compression is one of the key features of SQL Server 2008 and has and will solve more problems than Data reorganization will ever do.
    If you want to reorganize all the tables in your database, you can use this script:
    dbcc dropcleanbuffers
    dbcc freeproccache
    go
    DECLARE @tablename varchar(900)
    DECLARE @schemaname varchar(900)
    DECLARE @cmd VARCHAR (999)
    DECLARE @i INT
    DECLARE @max INT
    SELECT @max= count (*) FROM sys.sysobjects
         WHERE type = 'U'
    SET @i= 0
    DECLARE tnames_cursor CURSOR FOR
         SELECT schema_name (schema_id),[name]
         FROM sys.objects
         WHERE type = 'U'
         ORDER BY schema_id DESC, [name] ASC
    OPEN tnames_cursor
    FETCH NEXT FROM tnames_cursor INTO @schemaname, @tablename
    PRINT 'Starting ...'
    PRINT '---------------------------------------------'
    WHILE (@@fetch_status = 0)
    BEGIN
         SET @i= @i + 1
         IF (@i % 100 = 0)
              PRINT convert (VARCHAR (20), getdate ()) + ' - Currently updating (' + convert (VARCHAR (6), @i) + '/' + convert (VARCHAR (6), @max) + ') : ' + @schemaname + '.' + @tablename
         SELECT      @cmd = 'ALTER INDEX ALL ON [' + @schemaname + '].[' + @tablename + '] REBUILD WITH (MAXDOP = 0, ONLINE = OFF )'
         EXEC (@cmd)
         FETCH NEXT FROM tnames_cursor INTO @schemaname, @tablename
    END
    PRINT '---------------------------------------------'
    PRINT 'All tables have been processed..'
    DEALLOCATE tnames_cursor
    GO
    When you run this script, the SAP System should be down, as it can cause blocking situations, as it uses Tablelocks to reorganize the tables. If you want to use the online option, replace ONLINE = OFF with ONLINE = ON. This will minimize the blocking impact of the script, as the tables then gets reorganized online. See SQL Server Books Online for more details.
    Best regards
      Clas

  • Needing to convert a local "numeric" value to a string type using the expression browser.

    I am trying to convert a "numeric" local value to a string through the expression browser in order to supply a string arguement.  I am currently looking through the expression browser options, but I can not find any type of Number "ToString()" function.
    Solved!
    Go to Solution.

    Hi,
    Str() function
    ie
    locals.tostring = Str(locals.dec_value)
    Regards
    Ray Farmer

  • Message Mapping Nested Structure to key node in JDBC XML SQL Structure

    Hello everybody,
    I'm facing the next problem, I have the following nested structure
    <ns0:MT_Irdoc_ArchivoNested xmlns:ns0="http://ref.pemex.com/PI/FI/ArchivoIrdoc">
       <Header id_consecutivo="">
          <Transaction/>
          <Header2/>
          <Header3/>
          <Header4/>
          <Header5/>
          <Detail>
             <Transaction/>
             <Detail2/>
             <Detail3/>
             <Detail4/>
             <Detail5/>
          </Detail>
       </Header>
       <NombreArchivo/>
    </ns0:MT_Irdoc_ArchivoNested>
    as you can see, Detail is a nested Node from Header Node, and Detail is with occurrence 0...unbounded, I need to generate a SELECT XML SQL Structure as follows
       <StatementName>
              <dbTableName action=u201DSELECTu201D>
                  <table>realDbTableName</table>
                  <access>
                     <col1/>
                     <col2/>
                     <col3/>
                  </access>
                  <key1>
                     <col4>val4</col4>
                     <col5>val5</col5>
                     <col6>val6</col6>
                  </key1>
              </dbTableName> 
       </StatementName>
    now my problem is that col4 and col6 are values mapped from Header fields values, and col5 mus be mapped from Detail2 field of Detail Nested Structure, and Detail is 0...unbounded so it can contain any number of values and must included in the key structure, I tried by mapping the Detail Node to the key1 node, so it will generate n numbers of key1 nodes to include in the query, and the Detail number of nodes are not constant so I can't generate key2, key3, keyn...., so what I need is to create n numbers of instances of key1 node, but the problem is that when the mapping try to generate the second instance of key1 node it gives an error in the fields that comes from Header structure, maybe I'm trying to solve my problem wrong, could anyone give some advices or direction?, thanks in advance.
    Regards,
    Julio Cesar

    Julio,
    After placing the below logic in the mapping editor
    Details2 > SplitByValue> col5
    Right click on the Details2 node and choose Context. By Default you will see Details, because Details2 is the child of Details node. I want you to choose the Parent of Details node, I believe that would be HeaderID, am I right?
    If you don't want to do that then,
    Details2 ---> Remove Context > SplitByvalue> col5 will do the trick!
    raj.

  • What is the smallest data structure record in a .TXT file record to be recognized as an Apple Address Book "Data Card"?

    Hello! This is my first time in this discussion group. The question posed is the subject line itself:
    What is the smallest data structure record in a .TXT file record to be recognized as an Apple Address Book "Data Card"?
    I'm lazy! As a math instructor with 40+ students per class per semester (pCpS), I would rather not have to create 40 data cards pCpS by hand, only to expunge that info at semester's end. My college's IS department can easily supply me with First name, Last name, and eMail address info, along with a myriad of other fields. I can manipulate those data on my end to create the necessary .TXT file, but I don't know the essential structure of that file.
    Can you help me?
    Thank you in advance.
    Bill

    Hello Bill, & welcome aboard!
    No idea what  pCpS is, sorry.
    To import a text file into Address Book, it needs to be a comma delimited .csv file, like...
    Customer Name,Company,Address1,Address2,City,State,Zip
    Customer 1,Company 1,2233 W Seventh Street,Unit 543,Seattle,WA,99099
    Customer 2,Company 2,1 Park Avenue,,New York,NY,10001
    Customer 3,Company 3,65 Loma Linda Parkway,,San Jose,CA,94321
    Customer 4,Company 4,89988 E 23rd Street,B720,Oakland,CA,99899
    Customer 5,Company 5,432 1st Avenue,,Seattle,WA,99876
    Customer 6,Company 6,76765 NE 92nd Street,,Seattle,WA,98009
    Customer 7,Company 7,8976 Poplar Street,,Coupeville,WA,98976
    Customer 8,Company 8,7677 4th Ave North,,Seattle,WA ,89876
    Customer 9,Company 9,4556 Fauntleroy Avenue,,West Seattle,WA,98987
    Customer 10,Company 10,4 Bell Street,,Cincinnati,OH,89987
    Customer 11,Company 11,4001 Beacon Ave North,,Seattle,WA,90887
    Customer 12,Company 12,63 Dehli Street,,Noida,India,898877-8879
    Customer 13,Company 13,63 Dehli Street,,Noida,India,898877-8879
    Customer 14,Company 14,63 Dehli Street,,Noida,India,898877-8879
    Customer 15,Company 15,4847 Spirit Lake Drive,,Bellevue,WA,98006
    Customer 16,Company 16,444 Clark Avenue,,West Seattle,WA,88989
    Customer 17,Company 17,6601 E Stallion,,Scottsdale,AZ,85254
    Customer 18,Company 18,801 N 34th Street,,Seattle,WA,98103
    Customer 19,Company 19,15925 SE 92nd,,Newcastle,WA,99898
    Customer 20,Company 20,3335 NW 220th,2nd Floor,Edmonds,WA,99890
    Customer 21,Company 21,444 E Greenway,,Scottsdale,AZ,85654
    Customer 22,Company 22,4 Railroad Drive,,Moclips,WA,98988
    Customer 23,Company 23,89887 E 64th,,Scottsdale,AZ,87877
    Customer 24,Company 24,15620 SE 43rd Street,,Bellevue,WA,98006
    Customer 25,Company 25,123 Smalltown,,Redmond,WA,98998
    Try Address Book Importer...
    http://www.sillybit.com/abee/

  • How can I Convert a TeamViewer .tvs recording to other video formats?

    How can I convert a TeamViewer .tvs recording to other video formats in OSX v 10.9?

    This feature does not seem to be implemented in the Mac version.
    You'll have to convert the file using TeamViewer on Windows ;(

  • Can any one convert my SQL for Discoverer?

    This is a SQL you can run on the server but I was wondering if someone could convert the SQL for Discoverer?
    SQL:
    SELECT po.profile_option_name "NAME",
    po.USER_PROFILE_OPTION_NAME,
    decode(to_char(pov.level_id),
    ‘10001', ‘SITE’,
    ‘10002', ‘APP’,
    ‘10003', ‘RESP’,
    ‘10005', ‘SERVER’,
    ‘10006', ‘ORG’,
    ‘10004', ‘USER’, ‘???’) "LEV",
    decode(to_char(pov.level_id),
    ‘10001', ”,
    ‘10002', app.application_short_name,
    ‘10003', rsp.responsibility_key,
    ‘10005', svr.node_name,
    ‘10006', org.name,
    ‘10004', usr.user_name,
    ‘???’) "CONTEXT",
    pov.profile_option_value "VALUE"
    FROM FND_PROFILE_OPTIONS_VL po,
    FND_PROFILE_OPTION_VALUES pov,
    fnd_user usr,
    fnd_application app,
    fnd_responsibility rsp,
    fnd_nodes svr,
    hr_operating_units org
    WHERE po.profile_option_name LIKE ‘%&&profile%’
    AND pov.application_id = po.application_id
    AND pov.profile_option_id = po.profile_option_id
    AND usr.user_id (+) = pov.level_value
    AND rsp.application_id (+) = pov.level_value_application_id
    AND rsp.responsibility_id (+) = pov.level_value
    AND app.application_id (+) = pov.level_value
    AND svr.node_id (+) = pov.level_value
    AND org.organization_id (+) = pov.level_value
    AND decode(to_char(pov.level_id),
    ‘10001', ”,
    ‘10002', app.application_short_name,
    ‘10003', rsp.responsibility_key,
    ‘10005', svr.node_name,
    ‘10006', org.name,
    ‘10004', usr.user_name,
    ‘???’) LIKE ‘%&&username%’
    ORDER BY "NAME", pov.level_id, "VALUE";

    Hi,
    You can create a custom folder on using the administrator using the code,
    The only change is that you need the take off the conditions over the parameters and create those in the worksheet and not in the SQL.
    so you need to create the custom folder using:
    SELECT Po.Profile_Option_Name "NAME"
    *,Po.User_Profile_Option_Name*
    *,Decode(To_Char(Pov.Level_Id)*
    *,'10001'*
    *,'SITE'*
    *,'10002'*
    *,'APP'*
    *,'10003'*
    *,'RESP'*
    *,'10005'*
    *,'SERVER'*
    *,'10006'*
    *,'ORG'*
    *,'10004'*
    *,'USER'*
    *,'???') "LEV"*
    *,Decode(To_Char(Pov.Level_Id)*
    *,'10001'*
    *,'10002'*
    *,App.Application_Short_Name*
    *,'10003'*
    *,Rsp.Responsibility_Key*
    *,'10005'*
    *,Svr.Node_Name*
    *,'10006'*
    *,Org.NAME*
    *,'10004'*
    *,Usr.User_Name*
    *,'???') "CONTEXT"*
    *,Pov.Profile_Option_Value "VALUE"*
    FROM   Fnd_Profile_Options_Vl    Po
    *,Fnd_Profile_Option_Values Pov*
    *,Fnd_User Usr*
    *,Fnd_Application App*
    *,Fnd_Responsibility Rsp*
    *,Fnd_Nodes Svr*
    *,Hr_Operating_Units Org*
    WHERE  Pov.Application_Id = Po.Application_Id AND
    Pov.Profile_Option_Id = Po.Profile_Option_Id AND
    Usr.User_Id(+) = Pov.Level_Value AND
    Rsp.Application_Id(+) = Pov.Level_Value_Application_Id AND
    Rsp.Responsibility_Id(+) = Pov.Level_Value AND
    App.Application_Id(+) = Pov.Level_Value AND
    Svr.Node_Id(+) = Pov.Level_Value AND
    Org.Organization_Id(+) = Pov.Level_Value
    ORDER  BY "NAME"
    *,Pov.Level_Id*
    *,"VALUE";*
    Tamir

Maybe you are looking for