Question: insertion of several lines in the MS Sql Server table using the DB adapter

Hi all

I managed to insert a single row in a table of MS SQL Server via the adapter DB to my process BPEL, but when I tried to insert in mutiple lines in the same table of MS SQL server, I encounter the error below.

I use a DB SQL XA connection to connect to the server.

Kindly help me to solve the problem. Thanks in advance.

Error:

" < bpelFault > < faultType > 0 < / faultType > < remoteFault xmlns =" http://schemas.Oracle.com/BPEL/extension "> < a name ="summary"part > < summary > exemption is is produced when the binding was used." Exception occurred during invocation of the JCA binding: "JCA binding run 'merge' reference operations have to: DBWriteInteractionSpec Execute Failed Exception." the merger failed. The descriptor name: [LoadCmpAggSpendStage.SapTable]. Caused by com.microsoft.sqlserver.jdbc.SQLServerException: incorrect syntax near ')'... Check the logs for the record output full DBAdapter before this exception. This exception is considered as reproducible, probably due to a communication failure. To be classified as not reproducible rather add property nonRetriableErrorCodes with the '102' value in the deployment descriptor (i.e. weblogic - RA.Xml). Auto retry a reproducible fault set composite.xml for this invoke these properties: jca.retry.interval, jca.retry.count and jca.retry.backoff. All properties are integers. ". The called JCA adapter threw an exception of resource. Please examine the error message above carefully to determine a resolution. < /Summary. (> < / piece > < part name = "detail" > < detail syntax > incorrect near ')'. < / details > < / piece > < part name = "code" > < code > 102 < / code > < / piece > < / remoteFault > < / bpelFault >

Kind regards

Balaji Rahmani

It seems that in this case is called merge operation. If existing records (check primary key) are not there then it will be inserted on the other update. Check the syntax of the query that is created. It looks like she may have a supplement "). If you want to only insert then call insert operation and not merge.

Tags: Fusion Middleware

Similar Questions

  • Get several lines with the request - please help

    Hello

    I have query that gives me the output below.
    select distinct a.*,cu1.usr_key,cu1.first_nm,cu1.last_nm
    from(
          select ng.grp_key, ng.grp_nm , gt.grp_typ_nm, stts.nm as grp_sts, ng.expiry_date, ng.updt_dttm, stts.stts_key
          from new_group ng, user_group ug, group_type gt, status stts
          where ug.grp_key = ng.grp_key and ng.grp_typ_key = gt.grp_typ_key and 
          ng.stts_key = stts.stts_key and
          ug.usr_grp_rl_typ_key = 1 and 
          lower(ng.grp_nm) like 'test foe%'
          union 
          select ng.grp_key, ng.grp_nm , gt.grp_typ_nm, sts.nm as grp_sts, ng.expiry_date, ng.updt_dttm, sts.stts_key
          from new_group ng, group_type gt, status sts
          where ng.grp_typ_key = gt.grp_typ_key and ng.stts_key = sts.stts_key and 
          lower(ng.grp_nm) like 'test foe%')a, common_user cu1, user_group ug1
    where cu1.stts_key = a.stts_key and cu1.usr_key = ug1.usr_key and ug1.usr_grp_rl_typ_key = 1 and ug1.grp_key(+) = a.grp_key;
    18345 enemy test remove Group organization DELETED February 9, 12 AM 3 09.38.34 29742 Sam Saed
    18345 enemy test remove Group organization DELETED 9 February 12 09.38.34 AM 3 29643 dummyName514 dummy
    18345 enemy test remove Group organization DELETED February 9, 12 09.38.34 AM 3 28917 TestMObileUser Gujral
    18345 enemy test remove Group organization DELETED February 9, 12 AM 3 27284 Rocky jegou 09.38.34
    18345 enemy test remove Group organization DELETED February 9, 12 AM 3 28920 Bhavani Gujral 09.38.34
    18345 enemy test remove Group organization DELETED 9 February 12 09.38.34 AM 3 29645 dummyFName516 dummy
    18345 enemy test remove Group organization DELETED February 9, 12 AM 3 27316 Karthik Gilani 09.38.34
    18345 enemy test remove Group organization DELETED February 9, 12 AM 3 28147 Bowl David Mathews 09.38.34
    18345 enemy test remove Group organization DELETED February 9, 12 AM 3 09.38.34 29731 Sam Saed
    18345 enemy test remove Group organization DELETED February 9, 12 AM 3 28919 Madhu mango 09.38.34

    For a group 18345, there are 10 users and this is the reason why I get a multiple user records.

    I can't avoid these last three columns, because I have to show these values in the application.

    In my opinion, the UNION is at the origin of the problem. Can I replace the UNION here? Please share your ideas on this.

    Thank you
    Rambeau

    Published by: ouali on February 9, 2012 22:35

    Hello

    because I have to show these values in the application.

    What is your problem then? If you simply issue a SELECT statement to application code or send the data back to REF CURSOR, it will be quite OK to have several lines. That's what the SELECT statements are for: to return sets of results with several lines.
    So, could not explain your problem more in detail please? If you get an error somewhere, provide the code causing the error and the error message (it is probably ORA-001422 exact extraction returns several lines somewhere in PL: / SQL, isn't it? then post here).

    In my opinion, the UNION is at the origin of the problem. Can I replace the UNION here? Please share your ideas on this.

    Us don't know not the answer to this question, because no one here knows your needs (what you need).

  • We can insert a new line at the end of af: table declaratively?

    Mr President.

    We can insert a new line at the end of af: table declaratively?

    Concerning

    In the t impl class substitution as below, after that, you should be able to insert at the end of the table.

    @Override

    {} public void insertRow (rank)

    Line lastRow = this.last ();

    If (lastRow! = null) {}

    int j = this.getRangeIndexOf (lastRow) + 1;

    this.insertRowAtRangeIndex (j, line);

    this.setCurrentRow (row);

    } else {}

    super.insertRow (row);

    }

    }

  • Insert a blank line in the result set

    Hi friends,

    SELECT * FROM EMPLOYEES ORDER BY DEPARTMENT_ID;

    As a result of the foregoing, I need to INSERT a blank line in the result for each department_id. for example, the result should resemble the following:

    EMP_ID - NAME - SALARY - DEPARTMENT_ID
    101 - Albert - 10 000 - 10
    102 - Benjamin - 8 000 - 10

    103 - Chitra - 10 500 - 20
    104 - David - 4 500-20
    105 - Elango - 6 000 - 20

    106 - faye - 6 000 - 30
    107 - Ganga - 9 000 - 30

    etc.

    I don't want to insert into the table. I need a blank line just on the screen.

    Thanks in advance.

    Published by: James on March 8, 2010 11:37

    Something like this->

    satyaki>
    satyaki>select * from v$version;
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE    11.1.0.6.0      Production
    TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>
    satyaki>select m.empno,
      2         m.ename,
      3         m.sal,
      4         case
      5           when sal is null
      6           and  empno is null
      7           and  ename is null then
      8             null
      9         else
     10           m.deptno
     11         end deptno
     12  from (
     13        select k.empno,
     14              k.ename,
     15              k.sal,
     16              k.deptno
     17        from (
     18                select empno,
     19                             ename,
     20                             sal,
     21                             deptno
     22                from emp
     23            ) k
     24        union all
     25        select t.*
     26        from (
     27                select distinct null empno, null ename, null sal, deptno
     28                from emp
     29            ) t
     30        order by 4
     31      ) m;
    
         EMPNO ENAME             SAL     DEPTNO
    ---------- ---------- ---------- ----------
          7782 CLARK            2450         10
          7839 KING             5000         10
          7934 MILLER           1300         10
    
          7566 JONES            2975         20
          7369 SMITH             800         20
    
          7902 FORD             3000         20
          7876 ADAMS            1100         20
          7788 SCOTT            3000         20
    
         EMPNO ENAME             SAL     DEPTNO
    ---------- ---------- ---------- ----------
          7900 JAMES             950         30
          7499 ALLEN            1600         30
          7844 TURNER           1500         30
          7654 MARTIN           1250         30
          7521 WARD             1250         30
          7698 BLAKE            2850         30
    
    17 rows selected.
    
    Elapsed: 00:00:00.03
    satyaki>
    satyaki>
    

    Kind regards.

    LOULOU.

  • Problem with PPR in a table advanced with the insertion of several lines in create the page using 'add a new button '.

    Hello experts,

    I created a page that contains an array of advanced, 6-7fields (including a poplist column)

    Whenever I have add a new using the line add new line button, I get a null pointer exception.

    Code in Scenario1.


    Public Sub handleCurrencyChangeEvent()

    {

    PVO OAViewObject = (OAViewObject) findViewObject ("xxCurrencyPVO1");

    Line OARow = (OARow) pvo.first ();

    OAViewObject dtlVO = (OAViewObject) findViewObject ("xxEcreditCardDtlVO1");

    OARow dtlRow = (OARow) dtlVO.getCurrentRow ();

    String currency = (String) dtlRow.getAttribute ("CurrencyCode");    / / NULL POINTER EXCEPTION

    If ((currency == null) |) ("AED".equals (currency)))

    {

    row.setAttribute ("ExchangeRateTypeRender", Boolean.FALSE);

    row.setAttribute ("ExchangeRateDateRender", Boolean.FALSE);

    row.setAttribute ("ExchangeRateRender", Boolean.FALSE);

    }

    on the other

    {

    row.setAttribute ("ExchangeRateTypeRender", Boolean.TRUE);

    row.setAttribute ("ExchangeRateDateRender", Boolean.TRUE);

    row.setAttribute ("ExchangeRateRender", Boolean.TRUE);

    }

    }

    Public Sub initPVO()

    {

    OAViewObject appPropsVO = (OAViewObject) findViewObject ("xxCurrencyPVO1");

    If (appPropsVO! = null)

    {

    If (appPropsVO.getFetchedRowCount () == 0)

    {

    appPropsVO.setMaxFetchSize (0);

    appPropsVO.executeQuery ();

    appPropsVO.insertRow (appPropsVO.createRow ());

    Line OARow = (OARow) appPropsVO.first ();

    row.setAttribute ("RowKey", new Number (1));

    }

    }

    handleCurrencyChangeEvent();    / / If I comment on this call, there will be no null pointer when I click on the button Add a new rank and PPR will not be the first line when I select the poplist.                 

    }

    Public Sub createDetailRow()

    {

    String hdrId;

    OAViewObject hdrvo1 = (OAViewObject) getxxEcreditCardHdrVO1 ();

    OAViewObject dtlvo = (OAViewObject) getxxEcreditCardDtlVO1 ();

    Initialize and create a line of VO

    If (! dtlvo.isPreparedForExecution ())

    {

    dtlvo.setMaxFetchSize (0);

    dtlvo.executeQuery ();

    }

    Line dtlrow = dtlvo.createRow ();

    dtlvo.executeQuery ();

    int count = dtlvo.getRowCount ();

    dtlvo.insertRowAtRangeIndex (count, dtlrow);

    Development of the sequence for the number of request *.

    Number of dtlseq = getOADBTransaction () .getSequenceValue ("xxdm. XXDMI_ECREDIT_CARD_DTL_SEQ");

    hdrId = hdrvo1.getCurrentRow ().getAttribute("CreditCardHdrId").toString (); mind vo

    dtlrow.setAttribute ("CreditCardHdrId", hdrId);

    dtlrow.setAttribute ("CreditCardLineId", dtlseq);

    dtlrow.setAttribute ("LineNumber", count + 1);

    End of sequence generation *.

    dtlrow.setAttribute ("CurrencyCode", "AED");

    String currency = (String) dtlrow.getAttribute ("CurrencyCode");

    System.out.println ("CurrencyCode:" + currency);

    dtlrow.setNewRowState (Row.STATUS_INITIALIZED);

    } / / end createDetailRow()

    ' Public Sub processFormRequest (pageContext OAPageContext, OAWebBean webBean)

    {

    super.processFormRequest (pageContext, webBean);

    OAApplicationModule am = pageContext.getApplicationModule (webBean);

    Event string = pageContext.getParameter (OAWebBeanConstants.EVENT_PARAM);

    * Treatment add line button *.

    If ((ADD_ROWS_EVENT. Equals (Event)) & & "AdvTblRN".equals (pageContext.getParameter ("source"))) ".

    {

    am.invokeMethod ("createDetailRow", null);

    am.invokeMethod ("initPVO");

    } //**End add row button *.

    otherwise if

    ("currCodeChangeEvent".equals (pageContext.getParameter (OAWebBeanConstants.EVENT_PARAM)))

    {

    am.invokeMethod ("handleCurrencyChangeEvent");

    }

    ===========================================================================================================================

    Could please help what is wrong in the code, I followed all the steps as stated in the guide, but the table advance, the problem starts whenever I click on the button Add a new row for the creation of new line.

    I couldn't understand what was wrong with the code.

    Thanks in advance,

    Suman

    Suman,

    A few points:

    1. Why do you call handleCurrencyChangeEvent in the event to add a line? Simply set the useful, likely of the values in the line it himself.

    ex:-instead of calling the handleCurrenyChange method, simply add the below lines inside the createDetailRow()

    dtlrow.setAttribute ("ExchangeRateTypeRender", Boolean.FALSE);

    dtlrow.setAttribute ("ExchangeRateDateRender", Boolean.FALSE);

    dtlrow.setAttribute ("ExchangeRateRender", Boolean.FALSE);

    2. it looks like you have on the field of the currency and that fireAction handleCurrencyChangeEvent action method is called, right?

    Instead of using dtlVo.getCurrentRow, use the code below:

    public void handleCurrencyChangeEvent(String eventRowSourceParam)
      {
      OAViewObject pvo = (OAViewObject)findViewObject("xxCurrencyPVO1");
      OARow row = (OARow)pvo.first();
    
      OAViewObject dtlVO = (OAViewObject)findViewObject("xxEcreditCardDtlVO1");
    
      //OARow dtlRow = (OARow)dtlVO.getCurrentRow();
      OARow dtlRow = (OARow)this.findRowByRef(eventRowSourceParam);
    
      String  currency = (String)dtlRow.getAttribute("CurrencyCode");    // NULL POINTER EXCEPTION
    
      if ((currency == null) || ("AED".equals(currency)))
      {
      row.setAttribute("ExchangeRateTypeRender", Boolean.FALSE);
      row.setAttribute("ExchangeRateDateRender", Boolean.FALSE);
      row.setAttribute("ExchangeRateRender", Boolean.FALSE);
      }
      else
      {
      row.setAttribute("ExchangeRateTypeRender", Boolean.TRUE);
      row.setAttribute("ExchangeRateDateRender", Boolean.TRUE);
      row.setAttribute("ExchangeRateRender", Boolean.TRUE);
      }
      }
    

    In the controller:

    if((ADD_ROWS_EVENT.equals(event)) && "AdvTblRN".equals(pageContext.getParameter("source")) )
    {
      am.invokeMethod("createDetailRow",null);
      am.invokeMethod("initPVO");
    } //**End Add Row Button**
    else if ("currCodeChangeEvent".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
    {
      String eventRowSourceParam = pageContext.getParameter(EVENT_SOURCE_ROW_REFERENCE);
      Serializable[] params = {eventRowSourceParam};
        Class[] paramTypes    = {String.class};
      am.invokeMethod("handleCurrencyChangeEvent",params, paramTypes);
    }
    

    3. Why do you call initPVO when it is clicked on the Add line? Are you calling not just in the PR?

    You could call it once in the PR and let. When you call it PR, you may need to remove the handleCurrencyChangeEvent of this method call.

    See you soon

    AJ

  • missing parenthesis in insertion into separate lines select the table from the other table

    Hello

    could you help me with the following question?

    I have the following tables

    CREATE TABLE table1)

    ID varchar (12),

    col2 varchar (10),

    COL3 varchar (10),

    level varchar (10))

    CREATE TABLE table2)

    Id2 varchar (12)

    A varchar (10),

    B number (1)

    CONSTRAINT PRIMARY KEY PK (ID2, is));

    INSERT INTO table2 (ID2, A, B) SELECT ID, col2

    MAX (CASE WHEN level = "level 1" then 1

    level = 'level 2' then 2

    Level = 3 then 'niveau3') as colIN3)

    FROM table1 GROUP BY ID2, a.;

    the first table have duplicates as follows:

    Id2 COL2 COL3 level

    A1 pepe football level1

    A1 pepe football level2

    A1 pepe football level1

    A1 pepe basket level2

    A1 pepe pingpong level3

    the output should be selected with unique key (ID2, col3) lines and the level must be the greatest.

    Id2 COL2 COL3 level

    A1 pepe football level2

    A1 pepe basket level2

    A1 pepe pingpong level3

    The output of the script tells me the following messages:

    -lack of right parenthesis referring to the max function.

    Thanks adavance.

    Kind regards

    Hello

    Remember the ABC's of the GROUP BY:

    When you use a GROUP BY clause or in an aggregate function, then all in the SELECT clause must be:

    (A) a ggregate function,

    (B) one of the expressions "group By."

    (C) adding to C, or

    (D) something that Depends on the foregoing.  (For example, if you "GROUP BY TRUNC (dt)", you can SELECT "TO_CHAR (TRUNC (dt), 'Mon - DD')").

    To ask him, there are 5 columns in the SELECT clause.  The last one is a function MAX (...); It is an aggregate, is not serious.

    The first 2 columns are also named in the GROUP BY clause, so that they are well.

    The other 2 columns, country and internal_Id do not match any of the above categories.  These 2 columns cause the error.

    There are many ways to avoid this error, each producing different results.  You could

    • remove these 2 columns in the SELECT clause
    • Add these 2 columns in the GROUP BY clause
    • use the aggregation such as MIN, 2-column functions
    • remove the country from the SELECT clause and add internal_id to the GROUP BY clause
    • remove the internal_id from the SELECT clause, and add countries to the GROUP BY clause
    • ...

    What are the results you want?

    Whenever you have a question, please post a small example of data (CREATE TABLE and INSERT statements) for all the tables involved, so people who want to help you can recreate the problem and test their ideas.  Also post the results you want from this data, as well as an explanation of how you get these results from these data.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: https://forums.oracle.com/message/9362002

  • HP Officejet Pro L7590 all-in: HP officejet Pro L7590 prints 1/2 of the line of text on several lines of the document

    I received an email for the diagnosis of the printer and I was prompted to install the updated drivers and I did it and now when I print the test page, I get several lines of text that displays only the top or the bottom 1/2 letters across the page, I printed a self-test diagnostic Page and printed everything in pink , but it does not print 1/2 letters across the page as a test page, then I printed a page of print quality and it did the same as the test page and it does the same thing as the test page, then I tried calibrate spacing of thought which may fix the problem but does not , what can I do?

    Irven

    Hi mmcmret8,

    Thank you for your answer! It is possible that the print heads may need to be changed, at this point, I would recommend to you please call our hotline at the 800-474-6836. If you do not live in the United States / Canada region, please click the link below to get help from your region number. Language-country selector.

    Best regards!

  • Word RTF Tem [plate - insert a blank line in the loop

    I'm entering my template like this XML data (this is just an example of dumbed down):

    <? XML version = "1.0"? >

    < LABEL_TEST >

    < LIST_G_TEST >

    < G_LABEL_HEADER >

    < NAME > Parent 1 < / NAME >

    < / G_LABEL_HEADER >

    < G_LABEL_HEADER >

    < NAME > Kid 1 < / NAME >

    < / G_LABEL_HEADER >

    < G_LABEL_HEADER >

    < NAME > Parent 2 < / NAME >

    < / G_LABEL_HEADER >

    < G_LABEL_HEADER >

    < NAME > Parent 3 < / NAME >

    < / G_LABEL_HEADER >

    < G_LABEL_HEADER >

    < NAME > 4 Parent < / NAME >

    < / G_LABEL_HEADER >

    < G_LABEL_HEADER >

    < NAME > Kid 4 < / NAME >

    < / G_LABEL_HEADER >

    < / LIST_G_TEST >

    < / LABEL_TEST >

    In summary, I have a list of Parents, and if they have a child, the name of their children is below. Not all parents have children.

    If the data is a bit like this:

    Name of the parent

    Name of the child

    Name of the parent

    Name of the parent

    Name of the parent

    Name of the child

    When I loop data in my RTF model, I want to be able to insert a blank line before all of the lines 'Parent '. A bit like this:

    Name of the parent

    Name of the child

    Name of the parent

    Name of the parent

    Name of the parent

    Name of the child

    I tried to do this by adding an empty xml tag in the list, like this:

    <? XML version = "1.0"? >

    < LABEL_TEST >

    < LIST_G_TEST >

    < G_LABEL_HEADER >

    < NAME > Parent 1 < / NAME >

    < / G_LABEL_HEADER >

    < G_LABEL_HEADER >

    < NAME > Kid 1 < / NAME >

    < / G_LABEL_HEADER >

    < G_LABEL_HEADER >

    < NAME > < / NAME >

    < / G_LABEL_HEADER >

    < G_LABEL_HEADER >

    < NAME > Parent 2 < / NAME >

    < / G_LABEL_HEADER >

    < G_LABEL_HEADER >

    < NAME > < / NAME >

    < / G_LABEL_HEADER >

    < G_LABEL_HEADER >

    < NAME > Parent 3 < / NAME >

    < / G_LABEL_HEADER >

    < G_LABEL_HEADER >

    < NAME > < / NAME >

    < / G_LABEL_HEADER >

    < G_LABEL_HEADER >

    < NAME > 4 Parent < / NAME >

    < / G_LABEL_HEADER >

    < G_LABEL_HEADER >

    < NAME > Kid 4 < / NAME >

    < / G_LABEL_HEADER >

    < / LIST_G_TEST >

    < / LABEL_TEST >

    But that doesn't seem to work.

    Manny

    I found a solution that works very well.

    I added a new XML field to my data called .  In my model, this field is inserted in the line, but in a location where there is no data being printed. And it is formatted as white text, so that it basically just does not appear.

    So essentially, it's what I have now:

    Parent 1

    .

    Child 1

    .

    .

    Parent 2

    .

    .

    Parent 3

    .

    .

    Mother 4

    .

    Child 4

    .

    If the data is a bit like this:

    The name of the parent.

    The name of the child.

    .

    The name of the parent.

    .

    The name of the parent.

    .

    The name of the parent.

    The name of the child.

    When I loop data in my RTF model, the '. ' is a white text, then I get this:

    Name of the parent

    Name of the child

    Name of the parent

    Name of the parent

    Name of the parent

    Name of the child

  • Insert a blank line in the query output

    Is it possible to insert a blank line between two rows of the query output?

    In the EMP table, the column LINES is as follows:

    LINES
    1
    2
    3
    4
    1
    2
    3
    1
    2
    3
    4
    5

    I want to insert a blank line after every 1

    Please suggest.

    Sanjay

    I'm quite puzzled why you need rows in the dataset returned by a select statement that is empty.
    If you are using Oracle reports to the release date, you define the presentation of the report to have spaces between the rows returned by the select and have do not need to have the select statement returns a blank line after each line of data. If the output should be obtained by using another client, I think that the customer will have facilities for output formatting.

    Admit that you really need "blank lines" between data lines, I see only one way: use a temporary table and do an insert into select temporary_table (...) ... from... where... Then, in this temporary table, you can insert 'empty rows', which is actually not really empty, because they must have some fields that give the order of the rows. And then select in temporary_table, you place your order by the columns that are used to give the order for the release.
    Thus

    insert into temporary_table (
    ....
    )
    select ...
    from ...
    where ...
    ;
    for r in (
    select col1, col2, col3  -- columns used for order by
    from temporary_table
    order by col1, col2, col3
    )
    loop
      insert into temporary_table (col1, col2,col3, col4)
      values (r.col1,r.col2,r.col3, null);
    end loop;
    -- this way, a select * from temporary_tabel order by col1, col2, col3, col4 will return a blank row after each data row
    
  • How do to convert two points separated in several lines in the report, the column values

    Hi all

    I want to display two separate points of values in a column, in a row of multi in report.

    For example I have a Column1 in an array with the value 'A', column2 has the value "1".

    I want to show in a report of three lines using these two columns as

    Column1 Column2
    A 1
    B 1
    A s

    Here's one way:

    SQL> create table test (col1 varchar2(20), col2 number);
    
    Table created.
    
    SQL> insert all
      2    into test values ('A:B:C', 1)
      3    into test values ('Dg:Ezs', 2)
      4  select * from dual;
    
    2 rows created.
    
    SQL> select
      2    t.col2,
      3    regexp_substr(t.col1, '\w+', 1, t2.column_value) c1
      4  from test t,
      5    table(cast(multiset(select level
      6                        from dual
      7                        connect by level <= length(t.col1) - length(replace(t.col1, ':', '')) + 1
      8                       ) as sys.odcinumberlist )) t2
      9  order by 2, 1;
    
          COL2 C1
    ---------- --------------------
             1 A
             1 B
             1 C
             2 Dg
             2 Ezs
    
    SQL>
    

    Published by: little-foot 31 January 2012 10:13

  • Exaprom PDF: how cells that can cover several lines in the body of the table?

    I use Exaprom PDF but I have a case that I can't work.

    I would like to generate a table where a cell spans an entire line in the body of the table, the table should be translated as:

    ____________

    |__|__|__|__|

    |__|__|__|__|

    |___________|

    |__|__|__|__|

    Dear Marc,

    could you post an example how span a cell of an entire row in the table with the function body "Append custom Table.vi."

    For example, please use the 2009 version.

    Thank you

    Asper

    This message refers to the report Exaprom PDF generation tool:

    https://decibel.NI.com/content/docs/doc-10952

    Perhaps this.

  • How to write to several lines in the text element?

    I tried to write 2 lines in the text element, however only return one row:

    : myqueues.queue: = "Hello" | Chr (10) | ' world ';

    It gives me only 'Hello' in the first line and nothing else in the 2nd line.
    Are there settings needs to be activated in the property of text element?

    Try this:

    DECLARE
    v_filename VARCHAR(50);
    v_handle text_io.file_type;
    
    begin
    v_filename := get_file_name(file_filter=>'All files(*.*)|*.txt|');
    if
      v_filename is null
    then
      bell;
      return;
    end if;
    
    v_handle := text_io.fopen(v_filename, 'r');
    
    go_block ( 'myqueues' );
    clear_block;
    
    text_io.get_line(v_handle, :myqueues.queue );
    next_record;
    
    text_io.get_line(v_handle, :myqueues.queue );
    next_record;
    
    text_io.get_line(v_handle, :myqueues.queue );
    next_record;
    
    text_io.get_line(v_handle, :myqueues.queue );
    
    first_record;
    
    text_io.fclose(v_handle);
    
    exception when no_data_found then text_io.fclose(v_handle);
    
    end;
    

    Published by: Magoo on 02.10.2009 12:01

  • generate several lines of each row in a table

    Hi all, consider the following data
    with data1 as
    (
      select 1 id, 0 cust_sh, null mx_sh, 123 cust_coll from dual union all
      select 2 id,0 cust_sh, 0 mx_sh, 0 cust_coll from dual union all
      select 3 id,456 cust_sh, 890 mx_sh, 123 cust_coll from dual 
    ),
    data2 as
    (
      select 'cust_sh' col_nm, 'ABC' nm from dual union all
      select 'mx_sh' col_nm, 'BDC' nm from dual union all
      select 'cust_coll' col_nm, 'HGR' nm from dual 
    )
    what I'm trying to do here is to join the two tables sort and produce this output
    id  nm         amt
    =====================
    1   HGR        123
    3   ABC        456
    3   BDC        890
    3   HGR        123
    That's how I get this result. Data1 has lines with the ID and the columns with quantities such as cust_sh, etc.
    data2 bearing the name of the column in data1 under col_nm and an additional column as nm.

    for each line of Data1, I should take the amount column, look in database2 and the data1 amount is greater than 0.
    then display the output.

    for example, to get data1 row1. cust_sh is set to 0, so we don't look this column in Database2. mx_sh is set to null, which is not greater than 0, then us none.
    cust_coll has the value 123 so we wait for this column in Database2. This is the third row in Database2. Therefore, view us the id and the amt of Data1 and data2 nm.

    for line two of Data1, all after id columns are 0. don't have no need to display the output. only when the amount is greater than zero, we watch in Database2.

    third row, cust sh has value 456 so we expect in database2 and we found in the first row. mx_sh has a value of 890 (greater than 0) so again once we look at Database2 and display the output.

    can someone help me with a query that produces the output above?

    Thanks in advance

    OK, two more options:

    WITH pivot_data1 AS (
      SELECT id, 'cust_sh' as col_nm, cust_sh as amt
      FROM data1
      WHERE cust_sh > 0
      UNION ALL
      SELECT id, 'mx_sh', mx_sh
      FROM data1
      WHERE mx_sh > 0
      UNION ALL
      SELECT id, 'cust_coll', cust_coll
      FROM data1
      WHERE cust_coll > 0
    )
    SELECT d1.id
         , d2.nm
         , d1.amt
    FROM pivot_data1 d1
         JOIN data2 d2 ON d2.col_nm = d1.col_nm
    ;
    
    WITH pivot_data1 AS (
      SELECT id
           , case i when 1 then 'cust_sh'
                    when 2 then 'mx_sh'
                    when 3 then 'cust_coll'
             end as col_nm
           , case i when 1 then cust_sh
                    when 2 then mx_sh
                    when 3 then cust_coll
             end as amt
      FROM data1
           CROSS JOIN ( SELECT level i FROM dual CONNECT BY level <= 3 )
    )
    SELECT d1.id
         , d2.nm
         , d1.amt
    FROM pivot_data1 d1
         JOIN data2 d2 ON d2.col_nm = d1.col_nm
    WHERE d1.amt > 0
    ;
    
  • How to access a command window of Microsoft SQL Server 2008, use the SQL such as ALTER LOGIN commands?

    SQL Server Configuration Manager does not seem to give access to a command window.

    Hi Casey,.

    You have reached the end user Microsoft support. The question that you are running in suitable for the forum on the link below.
     
    Please report if you need help Windows. We're here to help
  • SQL Server 2005 - using the SQL Service Packs on the VCS Server 2.5

    Hello.

    We currently have an installation of data center with 2 servers ESX 3.5 and 1 Server 2.5 VCS. Version 2.5 of VCS runs on Microsoft SQL Server 2005 Standard Edition. The system worked for a short period and we have a number of models and virtual machines in the test and production laboratories. I would like to know if it is possible to apply the Service Pack of SQL Server 2005 so that I can enjoy the Maintenace Plan features in SP1 from. Did someone already did call a Service Pack for SQL Server 2005 that is running an instance for VCS 2.5 with success?

    If so, please let me know the methods used and any useful links that you may have found on the subject?

    Very much appreciated. : D

    I went through the process, and it is no different from any other.  Stop just vc and make backups of db.  Then proceed as usual.  I haven't run into no problems so far, and I am currently in SP3 for sql 2 k 5.

    -KjB

Maybe you are looking for

  • SDI Sub Out 3 has just stopped working

    My SDI 3 sub was working fine all day just like it should. This afternoon the camera wizard lets me know that they were not getting a picture. I tested the cable on a different signal and it works fine. The monitor works great too as I tested it on a

  • No app store on Apple TV 3

    Hi, the app store icon is missing on my Apple TV model 3 A1427. Anyway I can show him?

  • LJ P1102w: P1102w

    It seems that I can't install the HP software so I can set up my new HP Lj P1102w. Although I see my printer to the device τηε Manager and I can print what I want, when I start the implementation awaits installation in step 'connect the printer with

  • reports on problems and solutions

    under my reports on the problems and solutions, I get the following. ( Description Signature of the problem Additional information about the problem I have Home Basic windows on a Toshiba laptop and running kaspersky internet security 2012. I have no

  • Computer restarts continuously after the message "service windows module installation ended unexpectedly.

    My friend was running Vista sp2 comfortably, but now about 3-5 minutes after you connect on the following message is displayed: header: "You are about to be disconnected," containing the "Windows must now restart because Windows Module Installer Serv