Alerts not retrieving the correct number of records

Hi,
I have created alerts to run plans. These plans are getting records from DB and populating the ADC. The alerts are getting executed but are not retrieving the correct number of records.
I have created 5 alerts to run 5 plans all in the same time. The error at the "Data Flow service status" window is :
CACHED RESULT
     REQUEST ID: {4EB6B955-96B3-4AF2-B836-6C9F417D47A6}
     EXECPLAN ID: {11372B4D-9ACE-4CFB-831F-11028FF996D5}
     EXECPLAN NAME: xxxx
     FIX COUNT: 0
     START TIME: 6/8/2006 12:00:01 PM
     EXECUTION TIME: 0:00:00
     Sink Records Blocks Disk Blocks Fix Count Hit Count Execution Status
     0: 0 0 0 0 0
Complete - ERROR Error while processing the data for the step 'SQL Query'
This error is seen for 2-3 plans .......
But if i execute the plan manually from design studio there is no error.
So
1. Do i need to change anything in the config files to increase the MAx memory block?
2. Is there any way, the plans can be run one at a time i.e. configure alerts in such a way that if one plan finishes the other one starts automatically? Currently i have scheduled the plans to run at the same time using Alerts..
Please help...
Thanks

Here is one 'culprit' you can verify. Open DesignStudio. You should "--not--" see any grids or icons on (near) the botton status row. If you see them - right click and delete them. These are plans with same_names put in 'locked' state. After you do this. close your design studio.
Note- if you ever open a plan in designstudio, always "save" it and close it (exit). Donot click on window [x] mark to close the appl.
After above verifrication -- restart EnterpriseLink and restart PlanMonitor, verify if everything runs fine.
--sanjeev                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • OraDynaSet not returning the correct number of records.

    Hello All, I am writing VB code in Excel 2007 and retrieving records from a Oracle 9i database. When I run my query from TOAD or any other sql app I get 56 records returned for certain query. However, when I do it from VB in excel and write the values to the excel file, it will not return the last 3 records, any suggestions? Here is part of my code:
    Worksheets("Report").Range("A3").Value = ""
    Worksheets("Report").Range("B3").Value = "Period"
    Worksheets("Report").Range("C3").Value = "Budget"
    Worksheets("Report").Range("D3").Value = "Projected"
    strSQL = "select group_name,period_name,budget_value,budget_value project from nlas_bdgt_loading_stg where plant = " & plant & " and group_number = 1 order by group_number, period_num"
    Set OraDynaSet = objDataBase.DBCreateDynaset(strSQL, 0&)
    If OraDynaSet.RecordCount > 0 Then
    OraDynaSet.MoveFirst
    'Loop the recordset for returned rows
    For i = 4 To OraDynaSet.RecordCount
    'Put the results in columns
    ActiveSheet.Cells(i, 1) = OraDynaSet.Fields(0).Value
    ActiveSheet.Cells(i, 2) = OraDynaSet.Fields(1).Value
    ActiveSheet.Cells(i, 3) = OraDynaSet.Fields(2).Value
    ActiveSheet.Cells(i, 4) = OraDynaSet.Fields(3).Value
    OraDynaSet.MoveNext
    Next i
    End If
    Thanks,
    Chris

    Hello.
    It's a bit weird. It works for me. If you have a look at oo4o help:
    CopyToClipboard Method
    Example
    Applies To
    OraDynaset
    Description
    Copy the rows from the dynaset to the Clipboard in text format.
    Usage
    OraDynaset.CopyToClipboard(NumOfRows ,colsep [optional],rowsep [optional] )
    Arguments
    NumOfRows     Number of rows to be copied to the dynaset ,
    colsep     Column separator in CHAR to be inserted between columns
    rowsep     Row seperater in CHAR to be inserted between Rows
    Remarks
    This method is used to facilitate transfer of data between Oracle Object for OLE’s cache (dynaset) and Windows applications such as Excel or Word. CopyToClipboard copies data starting from current position of the dynaset up to the last row.
    Default column separator is TAB (ASCII 9).
    Default row separator is ENTER (ASCII 13).
    Can it be that you don't have all the References needed?
    Octavio

  • The illustration does not have the correct number of operands...

    I work on a Macbook Pro 10.8.5. When I open a file in AI CC and place any number of images, save and close the file. When I reopen the file I get this message. 'Can't open the illustration. The illustration does not have the correct number of operands for an operator... etc.' The file scan still open after this but all the placed images disappear.
    I've tested placing different formats ie. JPGs, TIFs, PNGs, flattened PSDs etc. They all come up with the same error.
    I've searched in Google and I haven't found a solution yet. There was a suggestion to import the AI file in INDD, this doesn't help beause all copy converts to outlines and embeds the images.
    Can anyone help?

    Hi, just tried this and AI says 'Could not open the file'. Here's a couple of screen grabs to show you my file setup and the exact error message.

  • Can't open Illustrator file - "does not have the correct number of operands..."

    Right off the bat - Mac, 10.6.8, Illustrator CS4. I've seen different variations of this "...correct number of operands..." error on these boards, with fonts and other things as the culprit, but I haven't come across this specific issue yet. If someone has seen something along these lines please let me know.
    I work for a small design agency that uses Illustrator CS4 on a consistent basis. We have had an ongoing issue where random files that had been working fine will sporadically become corrupt, causing us to have to use the Document Recovery Mode and then edit the file in a text editor to fix the problem which does work for this issue flawlessly, other than the headache of having to do this repeatedly.
    Our workflow is such that we use a local area storage RAID which everyone uses to access the same client files. These client files are all in a series of nested folders we employ to keep all our separate client's work separate. The error arises when certain images are placed into a document, then the document is saved and closed. Upon trying to reopen the file we get an error message like this:
    Where the string "/CR0050_ret.psd" is the filename of the offending image. Basically what has happened is that in the actual code for the document, there is a string that starts as "%%IncludeFile....." which specifies the file's pathway on the local area storage we use. The last segment of that string is the image's filename, which has gotten returned to the next line down, and now the program cannot interpret that line in the code, so it cannot properly open the file. The file will open but only the content that is above the offending IncludeFile string is visible.
    (client information blurred out)
    This does not happen to all the "%%IncludeFile" strings in the document, and does not happen for all images on our local area storage. We know how to fix the problem through the Document Recovery mode and then editing the text. Once we return the filename portion of the code back up to the proper line, and save the file in the text editor, the file will open in Illustrator and show all the information contained within properly. However, if you save the file out again without making any changes, the same errors will propagate throughout the file's code again, and become unreadable prompting another document recovery. Insert endless cycle here.
    What we would like to try and find out is why is this happening, so we can prevent it from happening in the future. Is the image nested too far down in the hierarchy of folders? Are there too many characters in the file pathway string? What can we do to keep this from happening moving forward?
    I know that an easy answer is to copy the files over locally to our hard drives, and work from there, but this is not a very efficient way to work, as we are all collectively working on different files, utilizing common image resources. We like to keep one set of images so there is no duplication that may lead to the wrong image being sent out - "Oh you sent John's version? You should have sent Molly's version of the image for that file"
    We also downloaded the trial version of Illustrator CS6 to see if an upgrade would work wonders, but it does not, the problem persists when saving a recovered file in CS6.
    Any thoughts? Thanks in advance.
    ABK

    In Illustrator it is generally not a good idea to read and write directly to and from a server: http://helpx.adobe.com/illustrator/kb/illustrator-support-networks-removable-media.html
    If you really think you need to do it, then check your network thoroughly.

  • PLSQL function does not return the correct number of rows?

    Hey folks. I'm still green when it comes to writing PLSQL. It's fun, rewarding and very frustrating. Hence, I'm turning to the experts. If you folks can help me understand what I'm doing wrong here, I'd really appreciate it.
    The code is somewhat specific to my company's product, but I think it should be easy to read and understand what I'm doing. If not, please let me know what I can clarify.
    All i'm trying to do is determine if the most recent iteration of data available for a particular host is a full scan or not (level2). I go about this in the following manner:
    1. get the operatingsystem id, it's scandate (preferred), the most recent scandate and it's scan status from a table of where all operating systems data lives. Loop through all the Oses
    (from this I set v_osid, v_mostrecentscandate, v_scandate).
    2. Before doing the crazy logic, pick the low hanging fruit
    2a. if the the level2 status of the host is N, then v_level2 = 'N';
    2b. if the level2 = 'Y' and the mostrecentscandate and scandate are identical, then v_level2 = 'Y';
    2c. for all other cases, go to 3
    3. Using v_mostrecentscandate, find all table id that may hold the most recent instance of data for the host
    4. Loop through through the concatenation of that id + _base. If you find the id in those tables, then store the id for the next step.
    5. When you I find the right id, I now concatenate the id + attrdata. For the host id, I look for any rows where attribute_value in (..) and the corresponding number_value is not null.
    5b. set v_level2 = 'Y'
    5c. otherwise, set v_level2 = 'N'
    6 end the loop
    7 wash, rinse, repeat for each OS.
    create or replace package body mostrecentlevel2 as
    function getMostRecentL2 return bdna_mostrecent_level2 pipelined IS
    v_lsid NUMBER;
    v_sql VARCHAR2(5000);
    v_sql_baseid NUMBER;
    v_sql_numv NUMBER;
    v_lsidt VARCHAR2(5000);
    v_lsidt2 VARCHAR2(5000);
    v_sql_rec VARCHAR2(5000);
    v_osid NUMBER;
    v_anchor DATE;
    v_ls CHAR(2);
    v_level2 CHAR(1);
    v_mostrecentscandate DATE;
    v_scandate DATE;
    cursor getOSinfo_cur is select operatingsystem_id, scandate, mostrecentscandate, level2 from bdna_all_os;
    cursor getlsID_cur is select id from local_scan where
              ((trunc(collect_start_time) - to_date(v_anchor))*24*60*60) <= ((to_date(v_mostrecentscandate) - to_date(v_anchor))*24*60*60)
              and
              ((trunc(collect_end_time) - to_date(v_anchor))*24*60*60) >= ((to_date(v_mostrecentscandate) - to_date(v_anchor))*24*60*60);
    getOSinfo_rec getOSinfo_cur%rowtype;
    getlsID_rec getlsID_cur%rowtype;
    BEGIN
    v_ls := 'ls';
    v_anchor := '01-JAN-01';
    FOR getOSinfo_rec IN getOSinfo_cur LOOP
         v_osid := getOSinfo_rec.operatingsystem_id;
         v_mostrecentscandate := getOSinfo_rec.mostrecentscandate;
         v_scandate := getOSinfo_rec.scandate;
         IF getOSinfo_rec.level2 = 'N' THEN
              v_level2 := 'N';
         ELSIF getOSinfo_rec.level2 = 'Y' THEN
              IF v_mostrecentscandate != v_scandate THEN
                   FOR getlsID_rec IN getlsID_cur LOOP
                        v_lsid := getlsID_rec.id;
                        v_lsidt := v_ls||v_lsid;
                        v_sql := 'select id from '||v_lsidt||'_base where id = '||chr(39)||v_osid||chr(39);
                        EXECUTE IMMEDIATE v_sql into v_sql_baseid;
                        IF SQL%ROWCOUNT > 0 THEN
                             v_lsidt2 := v_lsidt;
                             v_sql := '';
                        END IF;
                   END LOOP;
                   v_sql := 'select number_value from '||v_lsidt2||'_attr_data where
                             lower(attribute_name) IN ('||chr(39)||'numcpus'||chr(39)||', '||chr(39)||'totalmemory'||chr(39)||', '||chr(39)||'cpuutilpercent'||chr(39)||', '||chr(39)||'numprocesses'||chr(39)||')
                             and
                             number_value is not NULL
                             and
                             element_id = '||chr(39)||v_osid||chr(39);
                   EXECUTE IMMEDIATE v_sql into v_sql_numv;
                   IF SQL%ROWCOUNT > 0 THEN
                        v_level2 := 'Y';
                   ELSE v_level2 := 'N';
                   END IF;
              END IF;
              v_level2 := 'Y';
         END IF;
         PIPE ROW (mostRecentLevel2Format(v_osid,v_mostrecentscandate,v_level2));
    END LOOP;
    END;
    END;
    /Now some will ask why I'm using pipelining? Again, I'm green.. I was reading around, looking for a way to make this code run as fast as possible (because it's potentially got to go through 56K records and perform the expensive work on).
    I also realize I'm not providing the type or package code, and that's because I think I'm good on that. The code above compiles just fine without errors and when it runs, it only returns 6 consecutive rows.. I'm expecting 70K lol. So I know I'm doing something wrong.
    Any thoughts?
    Oh forgot to add this is on 11g R1 Enterprise Edition
    Edited by: ErrolDC on Nov 14, 2011 4:52 PM
    Edited by: ErrolDC on Nov 14, 2011 5:07 PM

    ErrolDC wrote:
    Hey folks. I'm still green when it comes to writing PLSQL. It's fun, rewarding and very frustrating. Hence, I'm turning to the experts. If you folks can help me understand what I'm doing wrong here, I'd really appreciate it.
    The code is somewhat specific to my company's product, but I think it should be easy to read and understand what I'm doing. If not, please let me know what I can clarify.Post a complete script that peoople who aren't as familiar with the application as you are can run to re-create the problem and test their ideas. In this case, that includes CREATE TABLE and INSERT statements for the tables used (just the columns needed for this job), a query that uses the function, and the results you want from that query given the data you posted.
    All i'm trying to do is determine if the most recent iteration of data available for a particular host is a full scan or not (level2). I go about this in the following manner:
    1. get the operatingsystem id, it's scandate (preferred), the most recent scandate and it's scan status from a table of where all operating systems data lives. Loop through all the Oses
    (from this I set v_osid, v_mostrecentscandate, v_scandate).
    2. Before doing the crazy logic, pick the low hanging fruit
    2a. if the the level2 status of the host is N, then v_level2 = 'N';
    2b. if the level2 = 'Y' and the mostrecentscandate and scandate are identical, then v_level2 = 'Y';
    2c. for all other cases, go to 3
    3. Using v_mostrecentscandate, find all table id that may hold the most recent instance of data for the host
    4. Loop through through the concatenation of that id + _base. If you find the id in those tables, then store the id for the next step.
    5. When you I find the right id, I now concatenate the id + attrdata. For the host id, I look for any rows where attribute_value in (..) and the corresponding number_value is not null.
    5b. set v_level2 = 'Y'
    5c. otherwise, set v_level2 = 'N'
    6 end the loop
    7 wash, rinse, repeat for each OS.
    create or replace package body mostrecentlevel2 as
    function getMostRecentL2 return bdna_mostrecent_level2 pipelined IS
    v_lsid NUMBER;
    v_sql VARCHAR2(5000);
    v_sql_baseid NUMBER;
    v_sql_numv NUMBER;
    v_lsidt VARCHAR2(5000);
    v_lsidt2 VARCHAR2(5000);
    v_sql_rec VARCHAR2(5000);
    v_osid NUMBER;
    v_anchor DATE;
    v_ls CHAR(2);
    v_level2 CHAR(1);
    v_mostrecentscandate DATE;
    v_scandate DATE;
    cursor getOSinfo_cur is select operatingsystem_id, scandate, mostrecentscandate, level2 from bdna_all_os;
    cursor getlsID_cur is select id from local_scan where
              ((trunc(collect_start_time) - to_date(v_anchor))*24*60*60) <= ((to_date(v_mostrecentscandate) - to_date(v_anchor))*24*60*60)
              and
              ((trunc(collect_end_time) - to_date(v_anchor))*24*60*60) >= ((to_date(v_mostrecentscandate) - to_date(v_anchor))*24*60*60);
    getOSinfo_rec getOSinfo_cur%rowtype;
    getlsID_rec getlsID_cur%rowtype;
    BEGIN
    v_ls := 'ls';
    v_anchor := '01-JAN-01';
    FOR getOSinfo_rec IN getOSinfo_cur LOOP
         v_osid := getOSinfo_rec.operatingsystem_id;
         v_mostrecentscandate := getOSinfo_rec.mostrecentscandate;
         v_scandate := getOSinfo_rec.scandate;
         IF getOSinfo_rec.level2 = 'N' THEN
              v_level2 := 'N';
         ELSIF getOSinfo_rec.level2 = 'Y' THEN
              IF v_mostrecentscandate != v_scandate THEN
                   FOR getlsID_rec IN getlsID_cur LOOP
                        v_lsid := getlsID_rec.id;
                        v_lsidt := v_ls||v_lsid;
                        v_sql := 'select id from '||v_lsidt||'_base where id = '||chr(39)||v_osid||chr(39);
                        EXECUTE IMMEDIATE v_sql into v_sql_baseid;
                        IF SQL%ROWCOUNT > 0 THEN
                             v_lsidt2 := v_lsidt;
                             v_sql := '';
                        END IF;
                   END LOOP;
                   v_sql := 'select number_value from '||v_lsidt2||'_attr_data where
                             lower(attribute_name) IN ('||chr(39)||'numcpus'||chr(39)||', '||chr(39)||'totalmemory'||chr(39)||', '||chr(39)||'cpuutilpercent'||chr(39)||', '||chr(39)||'numprocesses'||chr(39)||')
                             and
                             number_value is not NULL
                             and
                             element_id = '||chr(39)||v_osid||chr(39);
                   EXECUTE IMMEDIATE v_sql into v_sql_numv;
                   IF SQL%ROWCOUNT > 0 THEN
                        v_level2 := 'Y';
                   ELSE v_level2 := 'N';
                   END IF;
              END IF;
              v_level2 := 'Y';
         END IF;
         PIPE ROW (mostRecentLevel2Format(v_osid,v_mostrecentscandate,v_level2));
    END LOOP;
    END;
    END;
    /Now some will ask why I'm using pipelining? Again, I'm green.. I was reading around, looking for a way to make this code run as fast as possible (because it's potentially got to go through 56K records and perform the expensive work on).
    I also realize I'm not providing the type or package code, and that's because I think I'm good on that. The code above compiles just fine without errors and when it runs, it only returns 6 consecutive rows.. I'm expecting 70K lol. So I know I'm doing something wrong. You're calling TO_DATE with a DATE argument. Why are you calling TO_DATE at all?
    It seems like this condition:
    ((trunc(collect_start_time) - to_date(v_anchor))*24*60*60) <= ((to_date(v_mostrecentscandate) - to_date(v_anchor))*24*60*60) is equivalent to
    TRUNC (collect_start_time) <= v_mostrecentscandateThat probably has nothing to do with why you're only getting 6 rows.

  • Playlist folders do not contain the correct number of songs

    I have many manually generated playlists and I categorize them in a hierarchal manner using folders so that I can click on the folder and see all the songs contained in each of the sub-playlists.
    What I've realized recently (although I suspect it's been going on the entire time) is that when I click on the folder it does not contain nearly enough songs. In other words, there are many songs in the contained playlists that do not appear when I click on the containing folder.
    I first noticed in iTunes 9, but the problem persists into the newest version of iTunes.

    X3, have the same problem. I look in iTunes and the number of songs in 80's espanol is 27. I look in my iPod and it only shows 22, none of them are duplicates. After a random look in various playlists I am missing over 174 so far, and I am not half way through it. I would like to see how to fix this. So far I have reset my iPod, have over 130 GB of free space on it, so I have a feeling it is a bug. The other thing I found is if you find a song that is not in your iPod's playlist, and move it into another playlist it disappears. I am not sure how long it has been this way, one of my playlists I haven't added or deleted and songs from it in over a year, and it there is a difference of 3 songs between what iTunes has and what my iPod has.
    Message was edited by: MoanandGroan

  • Query does not retrieves the correct values

    Hi,
    pls look into the code.
    clear: wf_etenr,
             vbep.
    To get the Scheduled Loading date and Scheduled Arrival Date.
        SELECT MAX( etenr ) FROM  vbep INTO wf_etenr
                            WHERE vbeln = tvbdpl-vgbel
                            AND   posnr = wl_posnr.
        IF sy-subrc EQ 0.
          clear vbep.
          SELECT SINGLE * FROM vbep         "R02
                 WHERE vbeln = tvbdpl-vgbel "R02
                  AND posnr = tvbdpl-vgpos  "R02
                  AND etenr = wf_etenr.
          IF sy-subrc EQ 0.
    when i see the values at dictionary level using the same wher conditions are mismatching with the query excution result in the program.
    here in the second query ( SELECT SINGLE * ) it giving the wrong results .
    if i compare the results at table level ,some of the field values are missing after excuting the above second query.
    pls can any one give me ur suggestion on this !
    rgds
    sanjay reddy

    Hi,
    are these the same?
    wl_posnr and tvbdpl-vgpos
    try
    SELECT SINGLE * FROM vbep
    WHERE vbeln = tvbdpl-vgbel
    AND posnr = wl_posnr
    AND etenr = wf_etenr.
    IF sy-subrc EQ 0.
    to make somewhat consistent querys.
    regards
    Message was edited by: Zlatko
            Zlatko Stracenski

  • Query not returning correct number of records

    Hi Guys,
    Can someone please tell me why this query is not retrieving the correct number of records.
    I have a table with six users
    FIRST_NAME          LAST_NAME
    David               Robert
    Martin               Fisher
    Henry               Robert King
    Edmund               Tomkinson
    Williams          Hayes Robert
    Tina               Belkins
    When I run a query, SELECT * FROM USERS WHERE LAST_NAME LIKE 'Robert';
    I only get 1 record back (David Robert). Is the space between the last name
    causing this? If yes, How can I rewite the query?

    show a copy-paste example of your query...
    you need to use a wild card with LIKE, as in
    SQL> create table test
      2  (first_name varchar2(50)
      3  ,last_name varchar2(50)
      4  );
    Table created.
    SQL>
    SQL> insert into test values ('David' , 'Robert'           );
    1 row created.
    SQL> insert into test values ('Martin', 'Fisher'           );
    1 row created.
    SQL> insert into test values ('Henry' , 'Robert King'      );
    1 row created.
    SQL> insert into test values ('Edmund', 'Tomkinson'        );
    1 row created.
    SQL> insert into test values ('Williams',  'Hayes Robert');
    1 row created.
    SQL> insert into test values ('Tina',  'Belkins');
    1 row created.
    SQL>
    SQL> SELECT * FROM test WHERE LAST_NAME LIKE 'Robert';
    FIRST_NAME
    LAST_NAME
    David
    Robert
    SQL>
    SQL> SELECT * FROM test WHERE LAST_NAME LIKE '%Robert%';
    FIRST_NAME
    LAST_NAME
    David
    Robert
    Henry
    Robert King
    Williams
    Hayes Robert

  • Adobe Acrobat 8 Professional does not accept the correct serial number after reinstallation

    Adobe Acrobat 8 Professional does not accept the correct serial number after reinstallation, what to do?

    Thank you Bill. You could help me with the answer and the one in the other forum:
    "Acrobat has a separate installation process and needs to be activated with your Adobe ID I think. The question on CC is really one for the folks in the CC forum (Adobe Creative Cloud), not the Acrobat forum".
    I could resolve things with Adobe CC. I don´t need my old Acrobat 8, but I could finally install Acrobat XI Pro - and this time it seems to work, without permanently crashing down.
    Thank you.

  • Adobe Acrobat 8 Professionals does not accept the correct serial number after reinstallation

    Adobe Acrobat 8 Professionals does not accept the correct serial number after reinstallation, what to do?

    Moved to Acrobat Installation & Update Issues

  • TS2755 On new IOS 7, when I message contacts, it selects thier old contact number, despite the fact I have deleted/edited their number in my contacts list. IOnly by going through contacts, can I message the correct number. The old number does not appear t

    On new IOS 7, when I message contacts, it selects thier old contact number, despite the fact I have deleted/edited their number in my contacts list. Only by going through contacts, can I message the correct number. The old number does not appear there, so I am unsure where "messages" is picking up the old number, it doesn't appear that "messages" is synching with "contacts". Any ideas how to fix this?

    On new IOS 7, when I message contacts, it selects thier old contact number, despite the fact I have deleted/edited their number in my contacts list. Only by going through contacts, can I message the correct number. The old number does not appear there, so I am unsure where "messages" is picking up the old number, it doesn't appear that "messages" is synching with "contacts". Any ideas how to fix this?

  • HT1941 my laptop was stolen, the police do not believe the serial number on the receipt is the correct serial number?????? Is there anyway the computer can be tracked through apple or can they provide me the serial number?????

    My laptop was stolen and the police do not believe the serial number on my receipt is correct??? Is there a way through apple to obtain the actual serial number?

    If you registered the device with Apple, then the serial number is in your support profile. Simply look it up on your Support Profile.

  • Retrieving the row number of a specific record from the results of a MySQL query

    I want to create a MySQL query that will return a list of
    records, and then retrieve the row number of a record with a
    specific ID. How can I do this?
    *server-side script: PHP

    <?php
    $i = 0;
    do {
    $i++;
    } while (mysql_fetch_assoc($rsWhatever) &&
    $row_rsWhatever['ID'] !=57);
    echo "TADA -" . $i;
    ?>
    (assuming that ID is numeric, and that the test value
    actually exists in the
    database)
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "AngryCloud" <[email protected]> wrote in
    message
    news:g4e6ck$hrb$[email protected]..
    >I will use this scenario for an example:
    >
    > I want to know how far down the list I will find the ID,
    '57'.
    >
    > So I manually look at the list of results and see it is
    the 25th record
    > down
    > on the list.
    >
    > How do I get my PHP script to get this number (25)
    automatically?
    >

  • TABLE(CAST()) function not returning the correct results in few scenarios.

    I am using TABLE(CAST()) operation in PL/SQL and it is returning me no data.
    Here is what I have done:
    1.     Created Record type
    CREATE OR REPLACE TYPE target_rec AS OBJECT
    target__id          NUMBER(10),
    target_entity_id NUMBER(10),
    dd           CHAR(3),
    fd           CHAR(3),
    code      NUMBER(10),
    target_pct      NUMBER,
    template_nm VARCHAR2(50),
    p_symbol      VARCHAR2(10),
    pm_init          VARCHAR2(3),
    target_name     VARCHAR2(20),
    targe_type     VARCHAR2(30),
    target_caption     VARCHAR2(30),
    sort_order      NUMBER (4)
    2.     Created Table type
    CREATE OR REPLACE TYPE target_arr AS TABLE OF target_rec
    3.     Created Stored procedure which accepts parameter of type target_arr and runs the Table(Cast()) function on it.
         Following is the simplified form of my procedure.
         PROCEDURE get_target_weights
         p_in_template_target IN target_arr,
         p_out_count          OUT NUMBER,
         IS
         BEGIN
              SELECT count(*) into p_out_count
         FROM TABLE(CAST(p_in_template_target AS                     target_arr)) arr;
         END;
    I am calling get_target_weights from my java code and passing p_in_template_target with 10140 records.
    Scenario 1: If target_pct in the last record is 0, p_out_count returned from the procedure is 0.
    Scenario 2: If target_pct in the last record is any other value(say 0.01), p_out_count returned from the procedure is 10140.
    Please help me understand why the Table(Cast()) is not returning the correct results in Scenario 1. Also adding or deleting any record from the test data returns the correct results (i.e. if keep target_pct in the last record as 0 but add or delete any record).
    Let me know how can I attach the test data I am using to help you debugging as I don’t see any Attach file button on Post Message screen on the forum.

    I am not able to reproduce this problem with a small data set. I can only reproduce with the data having 10140 records.
    I am not sure if this is the memory issue as adding a new record also solves the problem.
    This should not be the error because of wrong way of filling the records in java as for testing purpose I just saved the records which I am sending from java in a table. I updated the stored procedure as well to read the data from the table and then perform TABLE(CAST()) operation. I am still getting 0 as the output for scenario 1 mentioned in my last mail.
    Here is what I have updated:
    1.     Created the table target_table
    CREATE Table target_table
    target_id          NUMBER(10),
    target_entity_id NUMBER(10),
    dd           CHAR(3),
    fd           CHAR(3),
    code      NUMBER(10),
    target_pct      NUMBER,
    template_nm VARCHAR2(50),
    p_symbol      VARCHAR2(10),
    pm_init          VARCHAR2(3),
    target_name     VARCHAR2(20),
    target_type     VARCHAR2(30),
    target_caption     VARCHAR2(30),
    sort_order      NUMBER (4)
    2.     Inserted data into the table : The script has around 10140 rows. Pls let me know how can I send it to you
    3.     Updated procedure to read data from table and stored into variable of type target_arr. Run Table(cast()) operation on target_arr and get the count
    PROCEDURE test_target_weights
    IS
         v_target_rec target_table%ROWTYPE;
         CURSOR wt_cursor IS
         Select * from target_table;
         v_count NUMBER := 1;
         v_target_arr cws_target_arr:= target_arr ();
         v_target_arr_rec target_rec;
         v_rec_count NUMBER;
         BEGIN
         OPEN wt_cursor;
         loop
              fetch wt_cursor into v_target_rec; -- fetch data from table into local           record.
              exit when wt_cursor%notfound;
              --move data into target_arr
              v_target_arr_rec :=                     cws_curr_pair_entity_wt_rec(v_target_rec target_id,v_target_rec. target_entity_id,
                        v_target_rec.dd,v_target_rec.fd,v_target_rec.code,v_target_rec.target_pct,
         v_target_rec.template_nm,v_target_rec.p_symbol,v_target_rec.pm_init,v_target_rec.template_name,
         v_target_rec.template_type,v_target_rec.template_caption,v_target_rec.sort_order);
              v_target_arr.extend();
              v_target_arr(v_count) := v_target_arr_rec;
              v_count := v_count + 1;
         end loop;
         close wt_cursor;
         -- run table cast on target_arr
         SELECT count(*) into v_rec_count
         FROM TABLE(CAST(v_target_arr AS target_arr)) arr;
         DBMS_OUTPUT.enable;
         DBMS_OUTPUT.PUT_LINE('p_out_count ' || v_rec_count);
         DBMS_OUTPUT.PUT_LINE('v_count ' || v_count);
    END;
    Output is
    p_out_count 0
    v_count 10140
    Expected output
    p_out_count 10140
    v_count 10140

  • Retrieve the Purchase Order Condition Records Table

    Hallo!
    I have found this code right here:
    http://www.sap-basis-abap.com/sapab025.htm
    It is very useful particular for purposes which I need. Please can somebody
    try to fix the error to get it working. There is an internal table missing.
    Regards
    Ilhan
    Retrieve the Purchase Order Condition Records Table
    select * from ekko.
           select * from konv where knumv = ekko-knumv
               "Get all the condition records for the purchase order
           endselect.
    endselect.
    * Get the info record conditions record
    * First declare the record structure for the key
    data: begin of int_konp,
                 txt1(5),
                 lifnr(5),
                 matnr(18),
                 txt2(4),
                 txt3(1),
            end of int_konp.
    clear: konh, konp, int_konp.
    * data for the record key konh-vakey
    int_konp-txt1    = '00000'.
    int_konp-lifnr    = ekko-lifnr+5(5).
    int_konp-matnr = ekpo-matnr(18).
    int_konp-txt2    = 'ALL'.
    int_konp-werks = ekpo-werks.
    int_konp-txt3    = '0'.
    select * from konh where      kschl = 'PB00'            "Conditions (Header)
                                         and datab => p_datum.       "valid from date
          if konh-vakey = int_konp.                                  "Conditions (Item)
                 select single * from konp where knumh = konh-knumh.
                 continue.
          endif.
    endselect.

    Hi flora
    Just get through the sequence .
    see the table fields ...
    1. From EKKO table take an entry which is having pricing conditions.
    Now in the fields list check out for field EKKO-KNUMV(document condition number).
    2.Take this condition number and now goto table KONV.
    Give the document condition number in the field  KONV-KNUMV and execute .
    This will lead to a list of document condition numbers and some other fields .
    3.Now check for field KONV-KNUMH ,KONV-KAWRT(quantity) and note the value KONV-KWERT  .
    (Remember this is at header level).
    This is ur condition record number.
    **comments
    Now from document condition number we got the condition record number (KNUMH).
    4. now since u want the item level tax procedure go to table KONP and give the condition record number and execute .
    This will give u a list of details .
    Now concentrate on KONV-KAWRT (scale quantity) KONP-KBETR(rate) as this table will store “Pricing  per UNIT “ so product of these two will give u the total pricing tax, for a particular condition type say PR00  .
    For that particular condition item .
    Check the pricing procedure .
    See t-code VK13 and check the pricing procedure .
    From me23 check the same PO num select the item and check the pricing conditions applicable .
    Select a particular pricing and goto condition->analysis->analysis pricing  ,
    Better take help of a SD functional consultant in the process.
    regards,
    vijay.

Maybe you are looking for

  • Jnlp.jar

    Author: bonnaire Hello, I wanted to make an application usable through JavaWebStart technology, it needs to read and write files on the local disk so, as I have seen, I need the FileOpenService and FileSaveService of the javax.jnlp API. But I can't f

  • ITunes Menu Bar Vanished

    I am using iTunes 11.0.4 (4)  an up to Date Mac and the Menu Bar at the top has disappeared! It will only show in Full Screen. I have searched the forums and I cannot get a little square at the top left to help me adjust viewing! Nothing is showing i

  • Blend and arch text

    Can someone show me how to create a blend like this and to arch text like this.Thanks for any help. New to photoshop. I am using cs5

  • Concurrent Manager doubt

    Hello all, We have 3 db node rac and 4 apps services. concurrent mangegers are running in apps nodes. now I want to bring down db node1 and shutdown managers on node1. here my question is if i want the mangers to run on other nodes so tht runnig jobs

  • Lap top hp won't turn on but has power

    Yesterday my hp was working just fine. I've had it for 2 in a half years. I set it down for five minutes and instead if the screen saver comming on it went greenish but was lit up, I could see the mouse but couldn't move it. I closed it and opened it