Infoset query with cero values

Hi
I have an infoset query that reads the information from an infoset. The infoset query is able to read the values, because it shows me values, but everything is cero, although I have values different from 0.
But if it didn`t find values it would tell me a different message as "No application data found" or something like this.
Then the problem is, my infoset read values, but everything that shows me is cero, and that´s not true.
Thanks and regards
SEM SEM

Hi,
What do you mean with the join condition ?
I have an infoset query with only one ODS inside. I didn´t want to build a query directly to the ODS as I did´t want to mark the flag available for reporting in the ODS, as it already had very importat data and I didn´t want to damage the ODS  data. That´s why I have built and infoset query with one ODS inside, and in this case I don´t understand the join condition....
Regards
SEM SEM
Does anybody know something ????
Regards
SEM SEM
Message was edited by:
        SEM SEM

Similar Messages

  • How could I replace hard coded value in my sql query with constant value?

    Hi all,
    Could anyone help me how to replace hardcoded value in my sql query with constant value that might be pre defined .
    PROCEDURE class_by_day_get_bin_data
         in_report_parameter_id   IN   NUMBER,
         in_site_id               IN   NUMBER,
         in_start_date_time       IN   TIMESTAMP,
         in_end_date_time         IN   TIMESTAMP,
         in_report_level_min      IN   NUMBER,
         in_report_level_max      IN   NUMBER
    IS
      bin_period_length   NUMBER(6,0); 
    BEGIN
      SELECT MAX(period_length)
         INTO bin_period_length
        FROM bin_data
         JOIN site_to_data_source_lane_v
           ON bin_data.data_source_id = site_to_data_source_lane_v.data_source_id
         JOIN bin_types
           ON bin_types.bin_type = bin_data.bin_type 
       WHERE site_to_data_source_lane_v.site_id = in_site_id
         AND bin_data.start_date_time     >= in_start_date_time - numtodsinterval(1, 'DAY')
         AND bin_data.start_date_time     <  in_end_date_time   + numtodsinterval(1, 'DAY')
         AND bin_data.bin_type            =  2
         AND bin_data.period_length       <= 60;
      --Clear the edr_class_by_day_bin_data temporary table and populate it with the data for the requested
      --report.
      DELETE FROM edr_class_by_day_bin_data;
       SELECT site_to_data_source_lane_v.site_id,
             site_to_data_source_lane_v.site_lane_id,
             site_to_data_source_lane_v.site_direction_id,
             site_to_data_source_lane_v.site_direction_name,
             bin_data_set.start_date_time,
             bin_data_set.end_date_time,
             bin_data_value.bin_id,
             bin_data_value.bin_value
        FROM bin_data
        JOIN bin_data_set
          ON bin_data.bin_serial = bin_data_set.bin_serial
        JOIN bin_data_value
          ON bin_data_set.bin_data_set_serial = bin_data_value.bin_data_set_serial
        JOIN site_to_data_source_lane_v
             ON bin_data.data_source_id = site_to_data_source_lane_v.data_source_id
            AND bin_data_set.lane = site_to_data_source_lane_v.data_source_lane_id
        JOIN (
               SELECT CAST(report_parameter_value AS NUMBER) lane_id
                 FROM report_parameters
                WHERE report_parameters.report_parameter_id    = in_report_parameter_id
                  AND report_parameters.report_parameter_group = 'LANE'
                  AND report_parameters.report_parameter_name  = 'LANE'
             ) report_lanes
          ON site_to_data_source_lane_v.site_lane_id = report_lanes.lane_id
        JOIN (
               SELECT CAST(report_parameter_value AS NUMBER) class_id
                 FROM report_parameters
                WHERE report_parameters.report_parameter_id    = in_report_parameter_id
                  AND report_parameters.report_parameter_group = 'CLASS'
                  AND report_parameters.report_parameter_name  = 'CLASS'
             ) report_classes
          ON bin_data_value.bin_id = report_classes.class_id
        JOIN edr_rpt_tmp_inclusion_table
          ON TRUNC(bin_data_set.start_date_time) = TRUNC(edr_rpt_tmp_inclusion_table.date_time)
       WHERE site_to_data_source_lane_v.site_id = in_site_id
         AND bin_data.start_date_time     >= in_start_date_time - numtodsinterval(1, 'DAY')
         AND bin_data.start_date_time     <  in_end_date_time   + numtodsinterval(1, 'DAY')
         AND bin_data_set.start_date_time >= in_start_date_time
         AND bin_data_set.start_date_time <  in_end_date_time
         AND bin_data.bin_type            =  2
         AND bin_data.period_length       =  bin_period_length;
    END class_by_day_get_bin_data;In the above code I'm using the hard coded value 2 for bin type
    bin_data.bin_type            =  2But I dont want any hard coded number or string in the query.
    How could I replace it?
    I defined conatant value like below inside my package body where the actual procedure comes.But I'm not sure whether I have to declare it inside package body or inside the procedure.
    bin_type     CONSTANT NUMBER := 2;But it does't look for this value. So I'm not able to get desired value for the report .
    Thanks.
    Edited by: user10641405 on May 29, 2009 1:38 PM

    Declare the constant inside the procedure.
    PROCEDURE class_by_day_get_bin_data(in_report_parameter_id IN NUMBER,
                                        in_site_id             IN NUMBER,
                                        in_start_date_time     IN TIMESTAMP,
                                        in_end_date_time       IN TIMESTAMP,
                                        in_report_level_min    IN NUMBER,
                                        in_report_level_max    IN NUMBER) IS
      bin_period_length NUMBER(6, 0);
      v_bin_type     CONSTANT NUMBER := 2;
    BEGIN
      SELECT MAX(period_length)
        INTO bin_period_length
        FROM bin_data
        JOIN site_to_data_source_lane_v ON bin_data.data_source_id =
                                           site_to_data_source_lane_v.data_source_id
        JOIN bin_types ON bin_types.bin_type = bin_data.bin_type
       WHERE site_to_data_source_lane_v.site_id = in_site_id
         AND bin_data.start_date_time >=
             in_start_date_time - numtodsinterval(1, 'DAY')
         AND bin_data.start_date_time <
             in_end_date_time + numtodsinterval(1, 'DAY')
         AND bin_data.bin_type = v_bin_type
         AND bin_data.period_length <= 60;
      --Clear the edr_class_by_day_bin_data temporary table and populate it with the data for the requested
      --report.
      DELETE FROM edr_class_by_day_bin_data;
      INSERT INTO edr_class_by_day_bin_data
        (site_id,
         site_lane_id,
         site_direction_id,
         site_direction_name,
         bin_start_date_time,
         bin_end_date_time,
         bin_id,
         bin_value)
        SELECT site_to_data_source_lane_v.site_id,
               site_to_data_source_lane_v.site_lane_id,
               site_to_data_source_lane_v.site_direction_id,
               site_to_data_source_lane_v.site_direction_name,
               bin_data_set.start_date_time,
               bin_data_set.end_date_time,
               bin_data_value.bin_id,
               bin_data_value.bin_value
          FROM bin_data
          JOIN bin_data_set ON bin_data.bin_serial = bin_data_set.bin_serial
          JOIN bin_data_value ON bin_data_set.bin_data_set_serial =
                                 bin_data_value.bin_data_set_serial
          JOIN site_to_data_source_lane_v ON bin_data.data_source_id =
                                             site_to_data_source_lane_v.data_source_id
                                         AND bin_data_set.lane =
                                             site_to_data_source_lane_v.data_source_lane_id
          JOIN (SELECT CAST(report_parameter_value AS NUMBER) lane_id
                  FROM report_parameters
                 WHERE report_parameters.report_parameter_id =
                       in_report_parameter_id
                   AND report_parameters.report_parameter_group = 'LANE'
                   AND report_parameters.report_parameter_name = 'LANE') report_lanes ON site_to_data_source_lane_v.site_lane_id =
                                                                                         report_lanes.lane_id
          JOIN (SELECT CAST(report_parameter_value AS NUMBER) class_id
                  FROM report_parameters
                 WHERE report_parameters.report_parameter_id =
                       in_report_parameter_id
                   AND report_parameters.report_parameter_group = 'CLASS'
                   AND report_parameters.report_parameter_name = 'CLASS') report_classes ON bin_data_value.bin_id =
                                                                                            report_classes.class_id
          JOIN edr_rpt_tmp_inclusion_table ON TRUNC(bin_data_set.start_date_time) =
                                              TRUNC(edr_rpt_tmp_inclusion_table.date_time)
         WHERE site_to_data_source_lane_v.site_id = in_site_id
           AND bin_data.start_date_time >=
               in_start_date_time - numtodsinterval(1, 'DAY')
           AND bin_data.start_date_time <
               in_end_date_time + numtodsinterval(1, 'DAY')
           AND bin_data_set.start_date_time >= in_start_date_time
           AND bin_data_set.start_date_time < in_end_date_time
           AND bin_data.bin_type = v_bin_type
           AND bin_data.period_length = bin_period_length;
    END class_by_day_get_bin_data;

  • Infoset query with KNB1 customer's ADRC information

    Hello,
    An explanation into the problem:
    I'm trying to create an infoset query with KNA1, KNB1 and ADRC which would do the following:
    In KNA1-SORTL we hold customer numbers which can be found from KNB1. This query should:
    Display KNA1-KUNNR and relevant address data for this customer via connection KNA1-ADRNR and ADRC-ADDRNUMBER. Then it should check KNA1-SORTL- field and if it corresponds to KNB1-KUNNR, it should go back to KNA1 with this KUNNR and display all this customer's relevant address data via this customer's KNA1-ADRNR to ADRC-ADDRNUMBER.
    I'm relatively new to infoset coding and ABAP in general, plus I'm self- taught so please bear that in mind.
    I'll give an example as to what I've managed to do so far. In SQ02 I joined tables KNA1(left outer join)KNB1 and KNA1(join)ADRC and created an extra field ZADRNR to see if I could display the ADRNR for the customer number found in KNB1.
    Something along the lines of:
    IF KNB1-KUNNR = KNA1-SORTL.
    SELECT SINGLE ADDRNUMBER FROM ADRC INTO ZADRNR
    WHERE ADDRNUMBER = KNA1-ADRNR.
    ENDIF.
    Obviously this doesn't work. Pseudocode would look like this:
    Check field KNA1-SORTL
    IF KNA1-SORTL = KNB1-KUNNR THEN
    GO BACK TO KNA1 with this KUNNR and display it's ADRC.
    KNB1 sadly doesn't maintain an ADRNR of it's own, or this would be much simpler.
    Any help or advice is much appreciated, so far I've only been coding a few lines in infosets with ABAP so I'm not all that familiar with it. I've managed to create several queries through trial and error, mostly, and this forum and it's articles have helped a great deal.
    Please let me know if I should provide any additional information, and my apologies if I posted this in the wrong forum area.

    Hi Lalit, and thank you very much for your reply.
    Unfortunately excluding space entries in selection screen wouldn't solve the issue, since we have KNA1-ADRNR for each entry, it's just that it would be different for customers found in KNB1.
    I could probably solve this by making two separate queries and working on them in excel and that way we would have the necessary information.
    But in order to do this in SAP seems to mean that I have to write a custom report. For that, it seems I'll be spending New Year's eve learning how to ABAP
    Thank you for your help, at least we don't have to struggle with finding out a way to do this via queries so we'll just find alternative means for this.
    Thanks again and have a happy new year!

  • How to force readObejct query with PK value to go to DB?

    The default behaviour for read-object queries with a PK value is to use the cache and not go to the database. How can we change this behaviour?
    We have cases that a row was deleted by some other process not through toplink, but the corresponding object still in the cache and if you use the readObject query with PK value, the object will be returned as result.
    Thanks in advance,

    There are several mechanisms to disable caching in TopLink. Note that disabling caching will affect your performance.
    In 9.0.4 you can use:
    - You can configure you cache type to use a WeakIdentityMap to ensure that only referenced objects are cached.
    - On descriptor you can call disableCacheHits() and alwaysRefreshCache() in code or click these options on the Caching/Identity tab in the Mapping Workbench.
    - Or to explicitly remove a deleted object from the cache uses session.removeFromIdentityMap(), but you must ensure there are no other objects referencing it.
    In 10.1.3 you can also use:
    - On descriptor you can call setIsIsolated(true) in code, or select isolated in the Caching tab in the Mapping Workbench.
    - Alternatively you can set a CacheInvalidationPolicy on your descriptor to ensure objects are not cached for longer than a specified time, or invalidated daily.
    - Or to explicitly invalidate a deleted object use, session.getIdentityMapAccessor().invalidateObject()

  • Question about infoset query with code

    Hi experts.
    I always appreciate your help. Today, I have some problem. I made infoset query using SQ01 and got some data. Those data include WBS no but some of them didn't. So I tried to put some code into the infoset query that any data has not WBS has some value, for example 'X', in WBS no field.
    I needed to know what field or table I should control to display value 'X' in WBS no field in case that WBS field has no value.
    I tried to put code at "END-OF-SELECTION(before display)" and control %dtab. But I met error message there is no such table %dtab. So, I define %dtab then during runtime, I also met error message %dtab has already been defiend.
    How can I do? Is it impossible thing?? I'm wating for your answer.
    regards.

    Hi, if you just want to fill the field if it is blank, you can do this in the Record Processing Section.
    I'm not familar with the WBS number, so for this example, I will fill the BISMT in MARA during the "Recording Processing" Section.
    if mara-bismt is initial.
    mara-bismt = 'X'.
    endif.
    Regards,
    Rich Heilman

  • CAML Query with Javascript value

    Hey everyone,
    I am building an Sharepoint 2013 app (SharePoint-Hosted) and using a CAML Query to get the current Item.
    The Current Item ID is 1 and i stored it in AccountID, but i want that variable inserted in the CAML Query so i get the proper information.
    var AccountID = 1
    camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef Name=ID LookupId="TRUE"/><Value Type="Text">1</Value></Eq></Where></Query></View>');
    But instead of putting the '1' value in the CAML Query, i want the variable AccountID in it... but how?
    Already tried this, but that didn't work:
    camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef Name=ID LookupId="TRUE"/><Value Type="Text">' + AccountID + '</Value></Eq></Where></Query></View>');
    Can someone help me with this?
    In forward, many thanks!

    Right, you have to use single quotes in a string literal inside double quotes. Just making sure it didn't have NO quotes, as your initial post showed.
    Is the ID field actually a lookup field? Or is it just the built-in ID field of the list? If it isn't a field of TYPE Lookup, try this:
    camlQuery.set_viewXml("<View><Query><Where><Eq><FieldRef Name='ID' /><Value Type='Number'>" + AccountID + "</Value></Eq></Where></Query></View>");
    Danny Jessee
    MCPD - SharePoint Developer 2010
    MCTS - SharePoint 2010, Configuring
    dannyjessee.com/blog

  • PHP+MySQL query with empty value

    Hi!
    Software is DW8 with Apache 2.0.48, MySQL ver. 4.0.15a, PHP
    4.2.3.
    We had problem when a submitted value for 'regionID' in the
    submit page
    was left blank and the following error message appears in the
    result page:
    "You have an error in your SQL syntax. Check the manual that
    corresponds
    to your MySQL server version for the right syntax to use near
    'LIMIT 0,
    3' at line 1"
    The problem was solved by adding at the top of the page:
    <?php
    if (isset($_POST['regionID']) &&
    empty($_POST['regionID'])) {
    $_POST['regionID'] = '0';
    ?>
    How to change the above code to retrieve ALL records when an
    empty \
    blank value is submitted for 'regionID'?
    TIA
    Nanu

    bbgirl wrote:
    > Something I picked up at a PHP/MySQL seminar...
    $_REQUEST works in place of
    > either $_GET or $_POST. It basically means use either
    get or post. But it is
    > less precise because it can pick up either variable and
    has to think about the
    > request...
    I'm afraid you've picked up rather poor information.
    $_REQUEST relies on
    register_globals being turned on. Since register_globals is
    considered a
    major security risk, the default setting has been off since
    April 2002.
    Many hosting companies have turned register_globals on, in
    spite of the
    security problems, because so many poorly written scripts
    rely on it.
    The PHP development team has decided to resolve this security
    issue once
    and for all by removing register_globals from PHP 6.
    Forget $_REQUEST. Use $_POST and $_GET always. It's safer,
    and it's
    futureproof.
    David Powers
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "Foundation PHP 5 for Flash" (friends of ED)
    http://foundationphp.com/

  • Query with scalar valued function with date filter

    Hello experts
    i have a problem by filtering my results with the date
    i have written the following code
    SELECT
    T1.ItemCode
    , T1.Dscription
    ,DBO.F_CALCULATION_QUANTITY(T1.ITEMCODE)
    FROM OINV T0 
    INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode
    INNER JOIN OSLP T3 ON T0.SLPCODE=T3.SLPCODE
    WHERE
    (T0.DOCDATE BETWEEN '2010-11-01' AND '2010-11-30')
    and (t2.cardcode ='80022')
    and (T0.CANCELED= 'N')
    group by  t1.itemcode, T1.Dscription, t2.suppcatnum
    set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    go
    ALTER  FUNCTION [dbo].[F_CALCULATION_QUANTITY]
    (@ITEMCODE AS NVARCHAR(10))
    RETURNS
    NUMERIC(19,2)
    AS
    BEGIN
    DECLARE
    @RESULT1 AS NUMERIC(19,2),
    @RESULT2 AS NUMERIC(19,2),
    @RESULT AS NUMERIC(19,2)
    SELECT @RESULT1=SUM(A.QUANTITY)
    FROM INV1 A
    JOIN OINV B ON A.DOCENTRY=B.DOCENTRY
    WHERE A.ITEMCODE=@ITEMCODE
    AND B.DOCDATE BETWEEN  '2010-11-01 00:00:00.000' AND '2010-11-30 00:00:00.000'
    SELECT @RESULT2=SUM(A.QUANTITY)
    FROM RIN1 A
    JOIN ORIN B ON A.DOCENTRY=B.DOCENTRY
    WHERE A.ITEMCODE=@ITEMCODE
    AND B.DOCDATE BETWEEN '2010-11-01 00:00:00.000' AND '2010-11-30 00:00:00.000'
    SELECT @RESULT=ISNULL(@RESULT1,0)-ISNULL(@RESULT2,0)
    --SELECT @RESULT=@RESULT1- @RESULT2
    RETURN @RESULT
    END
    the problem i have is that i want to filter my results accoring to the date provided by the user. i want it to be dynamic query.
    by now, what i do is to edit the docdate in the function in order to get the desired results. this is not what i want.
    could you please help me on this way in order to let the user to input the date?if i add the [%] in the query, it does not bring me the right results

    i have already edited the function to
    set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    go
    ALTER  FUNCTION [dbo].[F_CALCULATION_QUANTITY]
    (@ITEMCODE AS NVARCHAR(10),
    @STARTDATE1 as DATETIME,
    @ENDDATE1 AS DATETIME
    RETURNS
    NUMERIC(19,2)
    AS
    BEGIN
    DECLARE
    @RESULT1 AS NUMERIC(19,2),
    @RESULT2 AS NUMERIC(19,2),
    @RESULT AS NUMERIC(19,2)
    SELECT @RESULT1=SUM(A.QUANTITY)
    FROM INV1 A
    JOIN OINV B ON A.DOCENTRY=B.DOCENTRY
    WHERE A.ITEMCODE=@ITEMCODE
    AND B.DOCDATE BETWEEN (@STARTDATE1) AND (@ENDDATE1)
    SELECT @RESULT2=SUM(A.QUANTITY)
    FROM RIN1 A
    JOIN ORIN B ON A.DOCENTRY=B.DOCENTRY
    WHERE A.ITEMCODE=@ITEMCODE
    AND B.DOCDATE BETWEEN (@STARTDATE1) AND (@ENDDATE1)
    SELECT @RESULT=ISNULL(@RESULT1,0)-ISNULL(@RESULT2,0)
    RETURN @RESULT
    END
    could you please how to edit the query as well?
    i have added the following code and it comes up with the right itemcode but the quantity does not work
    DECLARE
    @ITEMCODE AS NVARCHAR(10),
    @STARTDATE1 as DATETIME,
    @ENDDATE1 AS DATETIME
    SET @STARTDATE1=(SELECT MAX(T0.DOCDATE) FROM oinv t0 WHERE T0.DOCDATE='2010-11-01')
    set @ENDDATE1=(SELECT MAX(T0.DOCDATE) FROM oinv t0 WHERE T0.DOCDATE='2010-11-30')
    SELECT
    T1.ItemCode
    , T1.Dscription
    ,DBO.F_CALCULATION_QUANTITY(@ITEMCODE,@STARTDATE1,@ENDDATE1)
    FROM OINV T0 
    INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode
    INNER JOIN OSLP T3 ON T0.SLPCODE=T3.SLPCODE
    WHERE
    (T0.DOCDATE BETWEEN @STARTDATE1 AND @ENDDATE1)
    and  (t2.cardcode ='80022')
    and (T0.CANCELED= 'N')
    group by  t1.itemcode, T1.Dscription, t2.suppcatnum
    the result is this
    70200     alert1     0.00
    70210     alert2     0.00
    70220     alert3     0.00
    70230     alert4     0.00
    as you can see the quantity is 0 and it shouldnt be
    Edited by: Fasolis Vasilios on Oct 31, 2011 10:49 AM

  • Select Query with minimum values

    Table name: employess_inout
    Column name: employee_code number(data type)
    IN_Time date(data type)
    Out_time date(data type)
    i want to select only in_time coloumn data with min intime as in one date A employee have more then 2 times in_time entry
    example
    employee_code in_time out_time
    1 18-mar-12 08:15:21 18-mar-12 13:02:01
    1 18-mar-12 14:07:46 18-mar-12 18:01:32
    1 19-mar-12 09:15:11 19-mar-12 12:58:54
    1 19-mar-12 14:10:01 19-mar-12 16:21:57
    1 19-mar-12 16:53:37 19-mar-12 18:15:33
    In above example I only want to select in_time column values which is minimum as 18-mar-12(08:15:21) like wise in date 19-mar-12 minimum value is 09:15:11.
    Please write the script.
    thanks in advance

    Dear Frank Kulash
    the Script is
    Select ei.emp_code,p.ename, d.department_name, ds.designation_name,
    to_char(ei.intime, 'dd') "IN_Date",
    to_char (ei.intime,'hh24:mi') "IN_Time" /*here i used "min" but not solved*/
    FROM einout ei, personnel p,departments d, designations ds
    where ei.emp_code = '470'
    and intime between to_date ('01/03/2012 08:10', 'dd/mm/YYYY hh24:mi')
    and to_date ('21/03/2012 10:00','dd/mm/YYYY hh24:mi')
    and ei.emp_code = p.emp_code
    AND p.dept_code = d.dept_code
    and p.desig_code = ds.desig_code
    group by ei.emp_code,p.ename, d.department_name, ei.intime,ds.designation_name --, ei.outtime
    order by ei.intime, ei.emp_code asc;
    Out Put
    EMP_CODE ENAME DEPARTMENT_NAME DESIGNATION_NAME IN_Date IN_Time
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 01 09:15
    *470      GHULAM YASSEN             INFORMATION TECHNOLOGY         OFFICER                   02          08:58*
    *470      GHULAM YASSEN             INFORMATION TECHNOLOGY         OFFICER                   02          14:04*
    *470      GHULAM YASSEN             INFORMATION TECHNOLOGY         OFFICER                   02          15:11*
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 03 09:06
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 05 17:07
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 06 09:47
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 07 09:36
    *470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 07 19:39* 470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 08 12:16
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 09 09:26
    *470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 09 14:08*
    I want to take out put
    like that
    EMP_CODE ENAME DEPARTMENT_NAME DESIGNATION_NAME IN_Date IN_Time
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 01 09:15
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 02 08:58
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 03 09:06
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 05 17:07
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 06 09:47
    470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 07 09:36
    I only need min time (value) once of A date.
    [Bold rows are no need in output]
    please tell how it will be possible

  • Query with boolean values

    Hi all,
    is it possible to create query which check boolean attributes? If yes, how?
    Thanks,
    Michele

    Hi Michele,
    If you have an attribute (e.g. "Active") of type boolean, then it should be something like:
    QueryExp exp = Query.eq(Query.attr("Active"),Query.value(true));Hope this helps,
    -- daniel
    JMX, SNMP, Java, etc...
    http://blogs.sun.com/jmxetc

  • Query with distinct values

    Hi, I have this query in my 9ir2 database:
      SELECT xmit.u_ii_id, xprol.ii_id
      FROM xprol, ( SELECT DISTINCT u_ii_id, ii_id
                    FROM t
                    WHERE NVL(key_t,'X') <> 'P') xmit
      WHERE xprol.ii_id = xmit.ii_id
      AND xmit.u_ii_id <> xprol.ii_id  ;
    u_ii_id                                  ii_id
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    6220                                       5765
    7898                                    3409
    7898                                    3409
    7898                                    3409
    7898                                    3409
    7898                                    3409
    7898                                    3409
    7898                                    3409
    7898                                    3409
    .The query returns 12.294.938 million of rows.
    I need to know de best way to filter this values... maybe using Analytic Functions?
    The result of the query must be...
    u_ii_id                                  ii_id
    6220                                       5765
    7898                                    3409Thanks!

    ROW_NUMBER () OVER (PARTITION BY xmit.u_ii_id
    ORDER BY xmit.u_ii_id,
    xprol.ii_id) AS rn
    xprol, (SELECT DISTINCT u_ii_id, ii_id
    FROM t
    HERE NVL (key_t, 'X') <> 'P') xmit
    WHERE xprol.ii_id = xmit.ii_id AND xmit.u_ii_id <>
    xprol.ii_id AND rn = 1
    /code]this will not work it will give , that needs to be in subquery
    ORA-00904: "RN": invalid identifier
    below is just an example
    SQL> select empno,e.deptno ,row_number() over(partition by deptno order by deptno) rn
      2  from emp e, (select deptno from dept1
      3    where deptno=10) d
      4    where e.deptno=d.deptno
      5    and rn=1;
      and rn=1
    ERROR at line 5:
    ORA-00904: "RN": invalid identifier
    /pre]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Append Query with multi values

    I am attempting to append information into a new database. The old project information has some fields that are multi-value. Apparently an append query cannot handle this. Is there a way I can over come this?

    Hi
    >>Apparently an append query cannot handle this
    Have you got some error? What's the problem you have encountered? Could you please show the sql you are using or share a sample to reproduce this ?
    If you're adding a value to your multi-valued field, you can us an append query like this,
    Insert into table (FieldName.value) values (value)
    Best Regards
    Lan
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to re-run query with bind values

    Hello,
    I have a sql statement which I obtained from statspack report. After looking at explan plan, I created an idex. Now I want to re-run the query and exame the explan plan again and see if newly created index helped. But how to re-run the query when it contains bind variables? Thank you.

    Have to define and exec them first (if you know the values; null otherwise, so if you can get values, you will have a better idea of what takes place).

  • Infoset - Query with navigational attribute as filter

    Dear all,
    We have created an InfoSet linking an InfoObject 0COORDER to an Info InfoCube containing order data.
    We have used a Left outer join to link 0COORDER tol 0COORDER in the InfoCube. The purpose is to be able to report on all 0COORDER even if they have no transaction data.
    When creating a query we get a list of all 0COORDER as expected. The problem arises when we try to use the navigational attribute "Status" from the InfoObect 0COORDER as a filter in the query. This does not work at all.
    Does anyone know what we are doing wrong here ? We are using BEx Query Designer 7.0.
    Kind Regards,
    Mikkel

    Hi Mikkel
    When you say that your Status field does not work at all, what is the error you are getting? Are you able to see this field in the query designer. If that is not the case that means your "status" is not chosen in the infoset design.
    If you are able to see it in the designer then please let us know what is the exact error you are getting.
    Thanks.

  • Query with min value

    Hi,
    my table TAB_ID:
    id..........desc_id.......num_id......count_id
    1............AAAA.........1.............2
    3............bbb..........2.............3
    7............sss..........1.............5
    4............ttt..........6.............7
    9............mmm..........3.............1
    8............llll.........3.............2
    10............dddd........4.............6
    12............yyyyy.......4.............5
    15............rrrr........4.............7
    16............nnnnn.......4.............3
    I'd like an output with these options:
    if there are same num_id I must take min(count_id)
    For example: id=1 has count_id=2 and id=7 has count_id=5 with same num_id=1, in this case I must take count_id=2
    id=9 has count_id=1 and id=8 has count_id=2 with same num_id=3, in this case I must take count_id=1
    therefore, for my table TAB_ID, the output will:
    id..........desc_id.......num_id......count_id
    1............AAAA.........1.............2
    3............AAAA.........2.............3
    4............AAAA.........6.............7
    9............AAAA.........3.............1
    16............AAAA.........4.............3
    How can i write this query?
    Thanks in advance!

    SQL> SELECT id,desc_id,num_id,count_id
      2  FROM
      3  (
      4  SELECT id,desc_id,num_id,count_id,
      5     min(count_id) over (partition by num_id order by count_id) mn
      6  FROM tab_id
      7  )
      8  WHERE count_id=mn
      9  /
            ID DESC_ID                  NUM_ID   COUNT_ID
             1 AAAA                          1          2
             3 bbb                           2          3
             9 mmm                           3          1
            16 nnnn                          4          3
             4 tttt                          6          7----
    Anwar

Maybe you are looking for

  • Mac Mini used as Apple TV (airplay and apple remote on iphone/ipod)

    Yesterday Apple announced the new Apple TV as an iOS device. It can be controlled using the apple remote app on an iphone or ipod touch. I am using a Mac Mini using Air Mouse to control the Mini which is hooked up to my TV. Would it be possible to us

  • Alternative payer/ bill toparty

    Hi gurus, can u tell me how many payers we can define for a customer.My client has requirement that they want four payers. So that if the primary payer does not pay then they can bill the seconday payer & so on But I am not sure how to configure it.

  • UNIX calls from a Windows platform thru JSP

    We have a Tomcat Webserver that runs off a Win2000 server. The primary interface is a JSP and the it fetches data out of an Oracle DB (hosted on Unix) and displays the same. Is there any way that I could also make calls to the Unix server to show som

  • Why firefox is saving files of ms office in ashx format ?

    Whenever i am saving any files of Microsoft office and pdf files , they are saved in attachment.ashx format which is very difficult to identify after downloading the file..pls help

  • Printing web pages problem

    Hi mac users, I have been using my ibook with my lexmark printer for a couple of years without too many problems. Just now I have been trying to print out a google map but it just freezes when I press print. I can't then cancel and get away from the