find and with an average of several lines

Hello

I'm having a little problem and I was wondering if anyone had any ideas on how to solve it better.

Here's the problem:

-J' have a 6000 lines large file by columns of 2500.

-Firstly I sort the file by columns 1 and 2

-then I find that different in these two columns (1 and 2) lines have the values duplicated, sometimes only twice, but sometimes three or four or five or up to 9 times.

-This duplication occurs in only the first two columns, but we do not know where lines and we do not know how it is. The remaining columns, i.e. 3 column to column 2500, for matching rows contain data.

-By programming, I would find the line duplicated by searching for columns 1 and 2 and when I find them, these lines of columns 3 to 2500 average data.

-Then, once this is done I want to save average data to the file. In each line of this file must have the name of colunm 1 and 2 and the values of the row average columns 3 to 2500. So the file has n rows, columns of 2500, where n will depend on how many duplicate rows exist in the original file.

I hope that makes sense. I explained the problem in a simple example below:

In the example below, we have two duplicates duplicate rows 1 and 2 and four in the 5 to 8 lines.

Example input file:

Col1 Col2 Col3... Col2500

3 4 0.2... 0.5

3 4 0.4... 0.8

8 5 0.1... 0.4

7 9 0.7... 0.9

2 8 0.1... 0.5

2 8 0.5... 0.8

2 8 0.3... 0.2

2 8 0.6... 0.7

6 9 0.9... 0.1

...

So based on the example above, the first two lines need on average (two duplicates) as do the lines 5-8 (four in doubles). The output file should look like this:

Col1 Col2 Col3... Col2500

3 4 0.3... 0.65

8 5 0.1... 0.4

7 9 0.7... 0.9

2 8 0.375... 0.55

6 9 0.9... 0.1

...


Tags: NI Software

Similar Questions

  • Problem with the help of several lines of flight path images. Any help would be greatly appreciated thanks!

    Hello

    I use several lines of flight path images, and when the mouse is hovering over an image rollover on the second row or below the image that is supposed to appear appears on the image at the top of its column. Any help would be appreciated, I've tried everything I can and can not find a way to solve this problem. If you need videos or screenshots of the problem, DOM Panel or code please ask. Thank you

    I'm on a mac on Yosemite and spin the latest version of dreamweaver

    Until you find permanent web hosting, do a Google search for free web hosting.  You will find a lot out there that you can use for temporary testing & debugging.

    Nancy O.

  • Find and replace the string function replaces line breaks when I only replaced spaces?

    I need to replace all instances of a space or a series of spaces to a line with commas (or tabs) multi string so I can throw in a worksheet.

    I use the regular expression [\s]+ and it works, but it is also to replace the end of lines (\r\n) too.

    How can I replace the spaces but leave the end of the lines intact?

    Right-click on the search string and to take '-' code display. Enter the space character (\s) correctly - you \\s right now.

  • 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

  • Just updated to Sierra and updated Pages at the same time. Now when I try to select a line of text I find myself with an insertion point where I stopped by selecting

    Today, I updated for Sierra and updated to the latest version of the Pages. Now I find that I am more able to select a line of text. When I try to do, I find myself with an insertion point where I stopped by selecting, but nothing is selected. This is a bug in the new version of pages or get my wrong settings?

    You use a Wacom tablet by chance?

    Solution: Press the shift key, just before stop selection. And Yes, that sounds like trouble in the Sierra.

  • Difference of dates with conditions and several lines

    Hello, I need to make a difference in the dates (seconds) from several lines of the eve of string comparison. FEA
    CREATE TABLE     evtmsg
    (       evt_date             DATE,
         message          VARCHAR2 (50)
    );
     
    INSERT INTO evtmsg (evt_date, message) VALUES (TO_DATE ('22/09/2010 8:39:05', 'DD/MM/YYYY HH24:MI:SS'), 'UTR 02MCD-1 fail');
    INSERT INTO evtmsg (evt_date, message) VALUES (TO_DATE ('22/09/2010 8:39:05', 'DD/MM/YYYY HH24:MI:SS'), 'UTR 02MAD-1 return');
    INSERT INTO evtmsg (evt_date, message) VALUES (TO_DATE ('22/09/2010 8:39:05', 'DD/MM/YYYY HH24:MI:SS'), 'UTR 02MCD-1 return');
    INSERT INTO evtmsg (evt_date, message) VALUES (TO_DATE ('22/09/2010 8:38:50', 'DD/MM/YYYY HH24:MI:SS'), 'UTR 02ZPD-1 fail');
    INSERT INTO evtmsg (evt_date, message) VALUES (TO_DATE ('22/09/2010 8:38:50', 'DD/MM/YYYY HH24:MI:SS'), 'UTR 02MAD-1 fail');
    INSERT INTO evtmsg (evt_date, message) VALUES (TO_DATE ('22/09/2010 8:38:38', 'DD/MM/YYYY HH24:MI:SS'), 'UTR 02MCD-1 fail');
    INSERT INTO evtmsg (evt_date, message) VALUES (TO_DATE ('22/09/2010 5:40:36', 'DD/MM/YYYY HH24:MI:SS'), 'UTR 02MCD-1 return');
    INSERT INTO evtmsg (evt_date, message) VALUES (TO_DATE ('22/09/2010 5:40:22', 'DD/MM/YYYY HH24:MI:SS'), 'UTR 02MCD-1 fail');
    "I need to complete the following table with time for each difference '"UTR 02XXXXXX"between the failure and return substr (message, 1, 11) I think * UTR 02MCD-1 *.

    {code}
    CREATE TABLE test
    (DATE date1,
    date2 DATE,
    VARCHAR2 (50) MSG
    );
    {code}

    And accurate data, that I need to get and to insert in the test tables are as follows:
    {code}
    2010-09-22 05:40:22-2010-09-21 05:40:36 UTR 02MCD-1 time of failure = 14 seconds
    22/09/2010 08:38:38-21/09/2010 08:39:05 UTR 02MCD-1 time of failure = 27 seconds
    22/09/2010 08:38:50-2010-09-21 08:39:05 UTR 02MAD-1 hour of default = 15 seconds
    22/09/2010 08:38:50 - UTR 02ZPD-1 time of failure =
    22/09/2010 08:39:05 - UTR 02MCD-1 time of failure =

    {code}

    I'll do this task every morning for the eve and UTR returns always but sometimes for the next day (not usually, but sometimes it happens). I managed to do something like that, but I don't know how to do for multiple lines and get you substr UTR 02XXXXX for each of them.

    {code}
    DECLARE
    date of the value of start_time;
    date of finish_time;
    elapsed_time number (20);

    BEGIN

    Select evt_date
    in start_time
    of evtmsg
    "where message like ' % UTR % MAD % % of failure."

    Select evt_date
    in finish_time
    of evtmsg
    where message like ' % UTR % MAD % % return ';

    elapsed_time: = (finish_time - start_time) * 24 * 60 * 60;
    dbms_output.put_line (elapsed_time);
    END;
    {code}

    If I can replace MAD MCD I get several lines and does not work.

    Thank you.

    All you have to do is shared in the first select statement into its separate elements:

    SELECT   evt_date_fail
             evt_date_return,
             id,
             TO_CHAR(TO_CHAR(evt_date_return, 'SSSSS') - TO_CHAR(evt_date_fail, 'SSSSS') seconds
    FROM    (SELECT evt_date evt_date_fail,
                    LEAD(evt_date) OVER (partition by id ORDER BY id||TO_CHAR(evt_date, 'yyyymmddhh24miss')||CASE status WHEN 'return' THEN 1 ELSE 2 END) evt_date_return,
                    id,
                    status
             FROM  (SELECT evt_date,
                           SUBSTR(message, 1, 11) id,
                           SUBSTR(message, 13) status
                    FROM   evtmsg
                    WHERE  message LIKE 'UTR%'
                    AND    categ = 1
                    AND    TRUNC(evt_date) = TRUNC(SYSDATE - 1)))
    WHERE    status like '%fall%'
    ORDER BY evt_date_fail
    

    Also, you may need to change the CASE statement in the column that uses the LEAD function to replace the 'return' with its Spanish equivalent

  • With an average of a spectral waveform and view / save

    Hello world!

    I am currently on a University project that consists on the use of Labview to obtain data and spectra of atmospheric plasmas using a spectrometer Ocean Optics HR4000.

    After not not using Labview for almost a year, I managed to get most of my knowledge back and I managed to display the spectral waveform, that I expect to get. However, as this is a fairly simple design I get a lot of noise and I would on average it for a graphic display more smooth.

    I looked into a lot of messages from the forum, but I couldn't really find what I was looking for.

    I also had a problem when you try to save the data and Spectra: I can't find anything in the directory of my VI.

    In the attachment you will find the current VI I'm trying.

    Thanks in advance for your answers!

    Jeremy

    I wrote an example for you below. This is an excerpt from VI, so you can drag the .png in your diagram and it becomes code. Pretend that everything in the green box is your Subvi spectrum acquisition.

    -Place the Subvi in a loop to run as many times as you like on average there

    -Out of the loop For is a table 2D with individual spectra on the lines

    -Transpose output, so individual spectra on the columns

    -Enter the table another loop to take the average rank by rank (with an average of different Spectra togeter).

    -Output is 1 d spectra average table

  • With an average of lines in a multidimensional array

    I have a file (file1.dat) that is created using the 'write on the worksheet file vi', that writes the output of a photo detector. Experience a try N. Each test gives a table 1 d M number of data as a column. Once the experience complete, the file will contain N columns and rows of Mr. I'd like to find the average of each line in labview. The output (file 2.dat) should be a column of M elements, each element being the average of the N data contained in one line. Treatment in excel or origin is not possible. Generally, > 10000 and N > 100 M. Can help? For example:

    file 1.dat:

    A1 B1 C1

    A2 B2 C2

    A3 B3 C3

    A4 B4 C4

    File 2. dat must be:

    (A1 + B1 + C1) / 3

    (A2 + B2 + C2) / 3

    (A3 + B3 + C3) / 3

    (A4 + B4 + C4) / 3

    Thank you!

    If everything you have in the database without headers or footers, it should be fairly simple.  Look at this:

    -Kevin P

  • Need help with windows defender. all my files folders pictures everythiing disappeared and I find myself with this black screen and it is not all good: o)

    Need help with windows defender. all my files folders pictures everythiing disappeared and I find myself with this black screen and it is not all good: o)

    I don't know why vista windows no longer charge, or when the files and folders disappeared

    How Windows Defender is on this problem?

    Follow these steps to try to solve your problems of boot.

     

     

    Restore point:

    Try typing F8 at startup and in the list of Boot selections, select Mode safe using ARROW top to go there > and then press ENTER.

    Try a restore of the system once, to choose a Restore Point prior to your problem...

    Click Start > programs > Accessories > system tools > system restore > choose another time > next > etc.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     

    If restore work not and you do not have a Vista DVD from Microsoft, do a repair disc to do a Startup Repair:

    Download the ISO on the link provided and make a record of repair time it starts.

    Go to your Bios/Setup, or the Boot Menu at startup and change the Boot order to make the DVD/CD drive 1st in the boot order, then reboot with the disk in the drive.

    At the startup/power on you should see at the bottom of the screen either F2 or DELETE, go to Setup/Bios or F12 for the Boot Menu.

    When you have changed that, insert the Bootable disk you did in the drive and reboot.

    http://www.bleepingcomputer.com/tutorials/tutorial148.html

    Link above shows what the process looks like and a manual, it load the repair options.

    NeoSmart containing the content of the Windows Vista DVD 'Recovery Centre', as we refer to him. It cannot be used to install or reinstall Windows Vista, and is just a Windows PE interface to recovering your PC. Technically, we could re-create this installation with downloadable media media freely from Microsoft (namely the Microsoft WAIK, several gigabyte download); but it is pretty darn decent of Microsoft to present Windows users who might not be able to create such a thing on their own.

    Read all the info on the website on how to create and use:

    http://NeoSmart.net/blog/2008/Windows-Vista-recovery-disc-download/

    ISO Burner:http://www.snapfiles.com/get/active-isoburner.html

    It's a very good Vista startup repair disk.

    You can do a system restart tool, system, etc it restore.

    It is NOT a disc of resettlement.

    And the 32-bit is what normally comes on a computer, unless 64-bit.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Data recovery:

    1. slave of your hard drive in another computer and read/save your data out there.

    2. put your Hard drive in a USB hard drive case, plug it into another computer and read/save from there.

    3 Alternatively, use Knoppix Live CD to recover data:

    http://www.Knopper.NET/Knoppix/index-en.html

    Download/save the file Knoppix Live CD ISO above.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    http://isorecorder.alexfeinman.com/isorecorder.htm

    Download the Vista software from the link above.

    After installing above ISO burning software, right click on the Knoppix ISO file > copy the Image to a CD.

    Knoppix is not installed on your PC; use only the resources of your PC, RAM, graphics etc.

    Change the boot order in YOUR computer/laptop to the CD/DVD Drive 1st in the boot order.

    Plug a Flash Drive/Memory Stick, BOOT with the Live CD, and you should be able to read the hard drive.

    When the desktop loads, you will see at least two drive hard icons on the desktop (one for your hard drive) and one for the USB key.

    Click on the icons of hard drive to open and to understand which drive is which.

    Click the icon for the USB drive and click on "Actions > Change the read/write mode" so you can write to disk (it is read-only by default for security reasons).

    Now to find the files you want to back up, just drag and drop them on the USB. When you're done, shut down the system and remove the USB key.

    See you soon.

    Mick Murphy - Microsoft partner

  • HP Envy 110 Series printers and I tried several times to reprint documents m in different qualities and align the cartridges, but the lines of words have dragged through them

    I have a HP Envy 110 series printers and I tried several times to reprint documents m in different qualities and align the cartridges, but the lines of words have dragged through them and are not clear. Much of the document is blurry and cut through. Any suggestions?

    Read this article, he describes some steps on how to use the printer utility that came with the printer to run a few steps that might improve the print quality, including cleaning the print cartridge and other procedures.

  • Find and replace it with an invalid Code in Dreamweaver CC 2015

    I have a HTML file of 800 line with about 200 H3 tags not closed I want to remove. I try to use search / replace, but it doesn't seem to be able to find non closed tags.

    In the excerpt below, I want to remove or delete the H3 tag:

    < /ul >

    < /li >

    < h3 class = "best_SubCategory_Title" id = "455474Title" >

    Best sedan

    < ul class = "ssMatchup_Entries" id = "Matchup455474Entries" >

    < /Li > < li > agreement

    Camry < li > < /li >

    Mazda 6 < /li > < li >

    Passat < li > < /li >

    < /ul >

    I tried different ways, but Dreamweaver search / replace engine can't not find invalid or cavities not blocked tags?

    Here are a few things that I tried, and as you can see, Dreamweaver cannot find the H3 tag:

    Screen Shot 2016-01-21 at 11.18.39 AM.png

    Screen Shot 2016-01-21 at 11.19.47 AM.png

    If I close it manually one of the H3 tags, and then find and replace can find. I think I can use regular expressions to do this, but I need to understand this too, if that's the only way.

    What do you think? Any idea on how to get rid of 200 H3 tags not closed? Perhaps another application?

    Answered my own question, here is the solution:

    For some reason, Dreamweaver cannot find and replace invalid code, or at least it is not easy to do. My problem was that I had a H3 tag not closed and would not replace it. I had to first close the H3 tag, and then I could replace it.

    I did a find and replace the one sought a ">" followed by a lot of white space, like this:

    As my license to close the H3 tag, then I could easily find and replace all now closed H3 tags, like this:

  • 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).

  • Insert several lines with dynamic data

    Hello
    When I do an insert into a table that has several lines of dynamic information. on
    a page, it inserts all rows that are dynamically filled. I want only what he
    to insert the lines that I choose the initials on. How can I do? Let's say I
    have 5 items that are displayed on a page and I want to insert only original
    the first 2 because the last 3 are left blank, how should I do this? I tried
    implementation of an if statement that says:

    < cfif "form. "Help of # PNR_Approval_Initials #" NEQ "" > "".

    Then make the insertion in the table

    < cfelse >
    < / cfif >

    I have this game were also up in a loop that says:

    < cfloop index = "help" list = "" #form.listofids # "delimiters =",">"

    Here is the code for just the insertion. I also have a code here
    Update another table. I got this to work, so I just try to get the insertion
    works fine for the moment. I can not use this where the query statement:
    Where ItemID = #id # because I'm trying to insert into the table of approval, not
    the items table. The table is just updated with some other info. in
    a few other input boxes.

    < cfloop index = "help" list = "" #form.listofids # "delimiters =",">"
    < cfif "form. "Help of # PNR_Approval_Initials #" NEQ "" > "".

    < cfquery Datasource = '#application. DataSource #">"
    Insert into accreditation (APV_ItemID,
    APV_ECID,
    Document_Type,
    Approval_Initials)

    Values (' #Evaluate ("form.) (' ItemID # help # ") #',
    ' #Evaluate ("form. ("ECID # help #") #',
    < cfif isDefined (form '. ') ("Help of # PNR_Doc_Type # ') and
    "form. "Help of # PNR_Doc_Type #" NEQ "" > "".
    ' #Evaluate ("form. ("Help of # PNR_Doc_Type # ') #',
    < cfelse >
    NULL,
    < / cfif >

    < cfif isDefined (form '. ') ("Help of # PNR_Approval_Initials # ') and
    "form. "Help of # PNR_Approval_Initials #" NEQ "" > "".
    ' #Evaluate ("form. (Aide de # PNR_Approval_Initials #») #
    < cfelse >
    Null value
    (< / cfif >)

    < / cfquery >

    < / cfif >
    < / cfloop >

    On the page display, just a table of dynamic info. Here are the 4
    things that I have on this page that needs to be inserted to the database.

    < input type = "hidden" name = "' ECID #ItemID #" value = "#ECID #" > "
    < input type = "hidden" name = "' ItemID #ItemID #" value = "#ItemID #" > "
    < input type = "hidden" name = "" PNR_Doc_Type #ItemID # ' value = "PNR Req" > "

    < td align = "center" >
    < cfif Approval_Initials is not "" > "".
    #Approval_Initials #.
    < cfelse >

    < select name = "PNR_Approval_Initials #ItemID #" >
    < option value = "" > select initials < / option >
    < cfloop query = "ShowInitials" >
    < Cfif Engineer_Initials EQ 1 >
    < option value = "#Initials #" > #Initials # < / option >
    < / cfif >
    < / cfloop >
    < / select >

    < / cfif >
    < table >

    Can someone help me please on just the insertion in the database so that it
    will insert on the lines that I chose the initials on and not others? Thank you.

    Andy

    You almost managed, but I see that you have commented.

    (" The help of # PNR_Approval_Initials # ') AND form ["PNR_Approval_Initials # help #" ""] NEQ "" >

    Do things here

  • Lexical in several lines and all parameter headers print in PLSQL

    HI team,

    I have some requirement in plsql can someone please help with solutions.

    1. print the headers on several lines in pl/sql block using the dbms_output
    I have some column FILE_name, creation_date and so on, I want to print multiple line headers

    ex:_

    Creating files
    Name Date
    -------------------------------------------------------
    xxd_top.txt June 10, 2009
    der_top.txt August 21, 2009

    2 using the lexical in plsql block in the cursor as parameter

    ex:*

    cursor c1 (p_parameter)
    is
    Select * from EMP
    where & p_parameter

    and I'm assigning the value of p_parameter in the begin block.
    When compiling I was getting error when compiling.

    Please give me some suggestions to solve these problems

    Thanks in advance
    Sriram

    If you want to only several lines of DBMS_OUTPUT then call DBMS_OUTPUT. Put_line several times. I'm guessing that you want this layout:

    File        Creation
    Name        Date
    ----------- ------------
    xxd_top.txt 10-Jun-2009
    der_top.txt 21-Aug-2009
    

    The simplest approach would be just something like

    DBMS_OUTPUT.PUT_LINE('File        Creation');
    DBMS_OUTPUT.PUT_LINE('Name        Date');
    DBMS_OUTPUT.PUT_LINE('----------- ------------');
    

    I tried with CHF solution and it worked.

    Post an example of what you have tried that does not work, maybe someone will see what is wrong with it.

  • Why most of the tabs open empty with the label "New tab" and "topic: vacuum ' in the address line to the restart of Firefox since installing Firefox 28?"

    I have a system dual-bootable Windows Vista SP2 and Firefox updated to 28 on both systems. Since the update of the tabs more reopen empty with the label "New tab" and "topic: vacuum" in the address line of Firefox is restarted. The tabs that open correctly seem to be those who in fact, I was at the session of prefious. I can recover the missing tabs using the Session Manager to pick up a previous session, but of course it does not pick up the tabs open in future sessions. It seems that the tabs that I go to the session recovered are saved correctly, as indicated above, but which are not revisited in the context of the use of the session retrieved will drop the URL next time that I open Firefox it again.

    jdgale:

    I don't have the time to do it. However, 29 is just around the corner and we will put in the channel of exit 29, then hope that the issue is not you.

    P.S. I had originally chosen your last answer as the solution that you have migrated more to 29 but it seems that you have taken off. I'll be marking your last answer as the solution so that we can get out of the queue.

Maybe you are looking for