Difference between select single & select upto 1 row

Hi,
what is the Difference between select single & select upto 1 row?
Whose performance is better?
Regards,
Mayank

Hi
According to SAP Performance course the SELECT UP TO 1 ROWS is faster than SELECT SINGLE because you are not using all the primary key fields.
The 'SELECT SINGLE' statement selects the first row in the database that it finds that fulfils the 'WHERE' clause If this results in multiple records then only the first one will be returned and therefore may not be unique.
Mainly: to read data from
The 'SELECT .... UP TO 1 ROWS' statement is subtly different. The database selects all of the relevant records that are defined by the WHERE clause, applies any aggregate, ordering or grouping functions to them and then returns the first record of the result set.

Similar Messages

  • Difference between select single * & select upto 1 rows

    difference between select single * & select upto 1 rows

    Hi,
       According to SAP Performance course the SELECT UP TO 1 ROWS is faster than SELECT SINGLE because you are not using all the primary key fields.
    Select single is a construct designed to read database records with primary key. In the absence of the primary key, it might end up doing a sequential search, whereas the select up to 1 rows may assume that there is no primary key supplied and will try to find most suitable index.
    The best way to find out is through sql trace or runtime analysis.
    Use "select up to 1 rows" only if you are sure that all the records returned will have the same value for the field(s) you are interested in. If not, you will be reading only the first record which matches the criteria, but may be the second or the third record has the value you are looking for.
    The System test result showed that the variant Single * takes less time than Up to 1 rows as there is an additional level for COUNT STOP KEY for SELECT ENDSELECT UP TO 1 ROWS.
    The 'SELECT SINGLE' statement selects the first row in the database that it finds that fulfils the 'WHERE' clause If this results in multiple records then only the first one will be returned and therefore may not be unique.
    Mainly: to read data from
    The 'SELECT .... UP TO 1 ROWS' statement is subtly different. The database selects all of the relevant records that are defined by the WHERE clause, applies any aggregate, ordering or grouping functions to them and then returns the first record of the result set.
    Mainly: to check if entries exist.
    Select Single
    You need to mention all the key fields of the table.
    No END SELECT required.
    More performance compared to upto 1 row.
    Where as UP to 1 row.
    YOu can use if you do not have all the primiary key fields available.
    END SELECT requeired.
    Since all keys are not passing, possiblities of have other rows which satisfies the condition.
    Select Statement with EndSelect is a loop, which in a single run retrieves a single Record. This Record has to be stored in a Work Area and then appended into an Internal Table.
    Select Statements without EndSelect is not a loop and it retrieves the whole Record set matching the Criteria in a single shot and has to be Stored in an Internal Table Directly.
    The most important thing to remember about the SELECT SINGLE is
    There are several things to remember:
    1) It retrieves only one row
    2) It does not need an ENDSELECT statement
    3) THE FULL KEY OF THE TABLE MUST BE INCLUDED IN
    THE WHERE CLAUSE OF THE SELECT STATEMENT
    Regards

  • Diffrence b/w select single & select upto one row

    hi
       wat is the diffrence b/w select single & select upto one row?
    deepak

    Hi,
    Select single has to be used with a where condition that has all the key fields:
    It will always return a unique record(If a match is found).
    Select upto 1 rows would get your the first record if multiple matches are found.
    and select up to has to be end with endselect statements.
    According to SAP Performance course the SELECT UP TO 1 ROWS is faster than SELECT SINGLE because you are not using all the primary key fields.
    select single is a construct designed to read database records with primary key. In the absence of the primary key, it might end up doing a sequential search, whereas the select up to 1 rows may assume that there is no primary key supplied and will try to find most suitable index.
    The best way to find out is through sql trace or runtime analysis.
    Use "select up to 1 rows" only if you are sure that all the records returned will have the same value for the field(s) you are interested in. If not, you will be reading only the first record which matches the criteria, but may be the second or the third record has the value you are looking for.
    The System test result showed that the variant Single * takes less time than Up to 1 rows as there is an additional level for COUNT STOP KEY for SELECT ENDSELECT UP TO 1 ROWS.
    The 'SELECT SINGLE' statement selects the first row in the database that it finds that fulfils the 'WHERE' clause If this results in multiple records then only the first one will be returned and therefore may not be unique.
    Mainly: to read data from
    The 'SELECT .... UP TO 1 ROWS' statement is subtly different. The database selects all of the relevant records that are defined by the WHERE clause, applies any aggregate, ordering or grouping functions to them and then returns the first record of the result set.
    Mainly: to check if entries exist.
    When you say SELECT SINGLE, it means that you are expecting only one row to be present in the database for the condition you're going to specify in the WHERE clause. so that means, you will have to specify the primary key in your WHERE clause. Otherwise you get a warning.
    SELECT UP TO 1 ROWS is used in cases where you just want to make sure that there is at least one entry in the database table which satisfies your WHERE clause. Generally, it is meant to be used for existence-check.
    You may not want to really use the values returned by the SELECT statement in this case (thought this may not necessarily be so).And in each case the database optimizer may choose a different strategy to retrieve the data.
    Knowing when to use SELECT SINGLE or SELECT ... UP TO 1 ROWS
    A lot of people use the SELECT SINGLE statement to check for the existence of a value in a database. Other people prefer to use the 'UP TO 1 ROWS' variant of the SELECT statement.
    So what's the difference between using 'SELECT SINGLE' statement as against a 'SELECT .... UP TO 1 ROWS' statement ?
    If you're considering the statements
    SELECT SINGLE field INTO w_field FROM table.
    and
    SELECT field INTO w_field FROM table UP TO 1 ROWS. ENDSELECT.
    then looking at the result, not much apart from the extra ENDSELECT statement. Look at the run time and memory usage and they may be worlds apart.
    Why is this ?? The answer is simple.
    The 'SELECT SINGLE' statement selects the first row in the database that it finds that fulfils the 'WHERE' clause If this results in multiple records then only the first one will be returned and therefore may not be unique.
    The 'SELECT .... UP TO 1 ROWS' statement is subtly different. The database selects all of the relevant records that are defined by the WHERE clause, applies any aggregate, ordering or grouping functions to them and then returns the first record of the result set.
    According to SAP Performance course the SELECT UP TO 1 ROWS is faster than SELECT SINGLE because you are not using all the primary key fields.
    http://sap-img.com/abap/difference-between-select-single-and-select-upto-one-rows.htm
    Check these links -
    The specified item was not found.
    diff between select single and up to one row
    diff b/w SECELT SINGLE *   AND SELECT UPTO ONE ROW
    Regards,
    Priyanka.

  • Select single & select upto n row .

    Hi,
    Can anyone tell me the actual difference between select single & select upto n rows . which has the good performance .
    Can anyone send a sample code for that.

    Hi
    Difference Between Select Single and Select UpTo One Rows
    According to SAP Performance course the SELECT UP TO 1 ROWS is faster than SELECT SINGLE because you are not using all the primary key fields.
    select single is a construct designed to read database records with primary key. In the absence of the primary key, it might end up doing a sequential search, whereas the select up to 1 rows may assume that there is no primary key supplied and will try to find most suitable index.
    The best way to find out is through sql trace or runtime analysis.
    Use "select up to 1 rows" only if you are sure that all the records returned will have the same value for the field(s) you are interested in. If not, you will be reading only the first record which matches the criteria, but may be the second or the third record has the value you are looking for.
    The System test result showed that the variant Single * takes less time than Up to 1 rows as there is an additional level for COUNT STOP KEY for SELECT ENDSELECT UP TO 1 ROWS.
    The 'SELECT SINGLE' statement selects the first row in the database that it finds that fulfils the 'WHERE' clause If this results in multiple records then only the first one will be returned and therefore may not be unique.
    Mainly: to read data from
    The 'SELECT .... UP TO 1 ROWS' statement is subtly different. The database selects all of the relevant records that are defined by the WHERE clause, applies any aggregate, ordering or grouping functions to them and then returns the first record of the result set.
    Mainly: to check if entries exist.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Select single * & Select  * upto one row

    What is the difference between Select single * & Select * upto one row?Performance wise which is a better one?

    Hi,
        According to SAP Performance course the SELECT UP TO 1 ROWS is faster than SELECT SINGLE because you are not using all the primary key fields.
    Select single is a construct designed to read database records with primary key. In the absence of the primary key, it might end up doing a sequential search, whereas the select up to 1 rows may assume that there is no primary key supplied and will try to find most suitable index.
    The best way to find out is through sql trace or runtime analysis.
    Use "select up to 1 rows" only if you are sure that all the records returned will have the same value for the field(s) you are interested in. If not, you will be reading only the first record which matches the criteria, but may be the second or the third record has the value you are looking for.
    The System test result showed that the variant Single * takes less time than Up to 1 rows as there is an additional level for COUNT STOP KEY for SELECT ENDSELECT UP TO 1 ROWS.
    The 'SELECT SINGLE' statement selects the first row in the database that it finds that fulfils the 'WHERE' clause If this results in multiple records then only the first one will be returned and therefore may not be unique.
    Mainly: to read data from
    The 'SELECT .... UP TO 1 ROWS' statement is subtly different. The database selects all of the relevant records that are defined by the WHERE clause, applies any aggregate, ordering or grouping functions to them and then returns the first record of the result set.
    Mainly: to check if entries exist.
    Select Single
    You need to mention all the key fields of the table.
    No END SELECT required.
    More performance compared to upto 1 row.
    Where as UP to 1 row.
    YOu can use if you do not have all the primiary key fields available.
    END SELECT requeired.
    Since all keys are not passing, possiblities of have other rows which satisfies the condition.
    Select Statement with EndSelect is a loop, which in a single run retrieves a single Record. This Record has to be stored in a Work Area and then appended into an Internal Table.
    Select Statements without EndSelect is not a loop and it retrieves the whole Record set matching the Criteria in a single shot and has to be Stored in an Internal Table Directly.
    The most important thing to remember about the SELECT SINGLE is
    There are several things to remember:
    1) It retrieves only one row
    2) It does not need an ENDSELECT statement
    3) THE FULL KEY OF THE TABLE MUST BE INCLUDED IN
    THE WHERE CLAUSE OF THE SELECT STATEMENT
    Regards

  • Diff between select single * or upto one row

    Hi,
    what is the difference between select single *   and   select upto one row.
    regards
    krishna

    Hi,
    According to SAP Performance course the SELECT UP TO 1 ROWS is faster than SELECT SINGLE because you are not using all the primary key fields.
    select single is a construct designed to read database records with primary key. In the absence of the primary key, it might end up doing a sequential search, whereas the select up to 1 rows may assume that there is no primary key supplied and will try to find most suitable index.
    The best way to find out is through sql trace or runtime analysis.
    Use "select up to 1 rows" only if you are sure that all the records returned will have the same value for the field(s) you are interested in. If not, you will be reading only the first record which matches the criteria, but may be the second or the third record has the value you are looking for.
    The System test result showed that the variant Single * takes less time than Up to 1 rows as there is an additional level for COUNT STOP KEY for SELECT ENDSELECT UP TO 1 ROWS.
    The 'SELECT SINGLE' statement selects the first row in the database that it finds that fulfils the 'WHERE' clause If this results in multiple records then only the first one will be returned and therefore may not be unique.
    Mainly:  to read data from
    The 'SELECT .... UP TO 1 ROWS' statement is subtly different. The database selects all of the relevant records that are defined by the WHERE clause, applies any aggregate, ordering or grouping functions to them and then returns the first record of the result set.
    Mainly: to check if entries exist.
    Regards,
    Bhaskar

  • SELECT SINGLE & SELECT UPTO 1 ROW

    Dear All,
    I want to optimise the Code performance.
    I don't have full table key. So, what is better to use - SELECT SINGLE or SELECT UPTO 1 ROW?
    Please ASAP.
    Thanks in advance.
    Prasad.

    Hi ,
    Difference Between Select Single and Select UpTo One Rows
    According to SAP Performance course the SELECT UP TO 1 ROWS is faster than SELECT SINGLE because you are not using all the primary key fields.
    select single is a construct designed to read database records with primary key. In the absence of the primary key, it might end up doing a sequential search, whereas the select up to 1 rows may assume that there is no primary key supplied and will try to find most suitable index.
    The best way to find out is through sql trace or runtime analysis.
    Use "select up to 1 rows" only if you are sure that all the records returned will have the same value for the field(s) you are interested in. If not, you will be reading only the first record which matches the criteria, but may be the second or the third record has the value you are looking for.
    The System test result showed that the variant Single * takes less time than Up to 1 rows as there is an additional level for COUNT STOP KEY for SELECT ENDSELECT UP TO 1 ROWS.
    The 'SELECT SINGLE' statement selects the first row in the database that it finds that fulfils the 'WHERE' clause If this results in multiple records then only the first one will be returned and therefore may not be unique.
    Mainly: to read data from
    The 'SELECT .... UP TO 1 ROWS' statement is subtly different. The database selects all of the relevant records that are defined by the WHERE clause, applies any aggregate, ordering or grouping functions to them and then returns the first record of the result set.
    Mainly: to check if entries exist.
    Regards
    ANJI

  • Difference between Multiple single values and Selection option variables

    Hi !
    Can any one tell me the difference between variable types:
    Multiple single values and Selection option?
    I used each one of them for selecting values for a characteristic but could not notice a difference in choosing values.
    Is there some difference in functionality or can they be used interchageably?
    Regards,
    Sri Harsha

    Harsha,
    When you go for slection option, in the variable input screen you will be having a button in the last where you can give your slections. There you can maintain either multiple single values and Multiple intervals or else not equal to also..
    Just check out there... you will be having tabs for each..
    Assign Points if it helps
    Gattu

  • Difference bt select single & select up 1 record

    What is the exact difference between select single and select up to 1 record

    Hi
    Difference Between Select Single and Select UpTo One Rows
    According to SAP Performance course the SELECT UP TO 1 ROWS is faster than SELECT SINGLE because you are not using all the primary key fields.
    select single is a construct designed to read database records with primary key. In the absence of the primary key, it might end up doing a sequential search, whereas the select up to 1 rows may assume that there is no primary key supplied and will try to find most suitable index.
    The best way to find out is through sql trace or runtime analysis.
    Use "select up to 1 rows" only if you are sure that all the records returned will have the same value for the field(s) you are interested in. If not, you will be reading only the first record which matches the criteria, but may be the second or the third record has the value you are looking for.
    The System test result showed that the variant Single * takes less time than Up to 1 rows as there is an additional level for COUNT STOP KEY for SELECT ENDSELECT UP TO 1 ROWS.
    The 'SELECT SINGLE' statement selects the first row in the database that it finds that fulfils the 'WHERE' clause If this results in multiple records then only the first one will be returned and therefore may not be unique.
    Mainly: to read data from
    The 'SELECT .... UP TO 1 ROWS' statement is subtly different. The database selects all of the relevant records that are defined by the WHERE clause, applies any aggregate, ordering or grouping functions to them and then returns the first record of the result set.
    Mainly: to check if entries exist.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Select Single & Select upto -- req when to use?

    Hi Guys!
         Can u pls tell me when to use select single * & when to use select upto 1 rows. with eg.
      Thanks.

    According to SAP Performance course the SELECT UP TO 1 ROWS is faster than SELECT SINGLE because you are not using all the primary key fields.
    Select single is a construct designed to read database records with primary key. In the absence of the primary key, it might end up doing a sequential search, whereas the select up to 1 rows may assume that there is no primary key supplied and will try to find most suitable index.
    The best way to find out is through sql trace or runtime analysis.
    Use "select up to 1 rows" only if you are sure that all the records returned will have the same value for the field(s) you are interested in. If not, you will be reading only the first record which matches the criteria, but may be the second or the third record has the value you are looking for.
    The System test result showed that the variant Single * takes less time than Up to 1 rows as there is an additional level for COUNT STOP KEY for SELECT ENDSELECT UP TO 1 ROWS.
    The 'SELECT SINGLE' statement selects the first row in the database that it finds that fulfils the 'WHERE' clause If this results in multiple records then only the first one will be returned and therefore may not be unique.
    Mainly: to read data from
    The 'SELECT .... UP TO 1 ROWS' statement is subtly different. The database selects all of the relevant records that are defined by the WHERE clause, applies any aggregate, ordering or grouping functions to them and then returns the first record of the result set.
    Mainly: to check if entries exist.
    Select Single
    You need to mention all the key fields of the table.
    No END SELECT required.
    More performance compared to upto 1 row.
    Where as UP to 1 row.
    YOu can use if you do not have all the primiary key fields available.
    END SELECT requeired.
    Since all keys are not passing, possiblities of have other rows which satisfies the condition.
    Select Statement with EndSelect is a loop, which in a single run retrieves a single Record. This Record has to be stored in a Work Area and then appended into an Internal Table.
    Select Statements without EndSelect is not a loop and it retrieves the whole Record set matching the Criteria in a single shot and has to be Stored in an Internal Table Directly.
    The most important thing to remember about the SELECT SINGLE is
    There are several things to remember:
    1) It retrieves only one row
    2) It does not need an ENDSELECT statement
    3) THE FULL KEY OF THE TABLE MUST BE INCLUDED IN
    THE WHERE CLAUSE OF THE SELECT STATEMENT
    to say in simple
    SELECT SINGLE:
    1. Select single is based on PRIMARY KEY
    2. It will take the first record directly without searching of all relevant records.(Though you have lot of records for given condition)
    SELECT UPTO 1 ROW :
    It will check all records for given condition and take the first record .
    It means in select single no searching, where as other searching.
    Therefore, select single more efficient than UPTO 1 ROW.

  • Difference between screen and selection screen

    explain the difference between
    call screen
    and
    call selection-screen
    with easy understandable explanation with simple example
    thanks guyz

    Hi,
    <b>CALL SCREEN</b> interrupts the processing of the current screen to call a new screen or a chain of screens, processing of the current screen is resumed directly after the call.
    Call selection-screen
    Similar to <b>CALL SCREEN</b>, except the screen you are calling must be a selection screen defined using<b> SELECTION-SCREEN BEGIN/END OF SCREEN</b> or the standard selection screen of a report.
    It calls the selection screen with in the program.
    If you call a selection screen using <b>CALL SCREEN</b> instead of <b>CALL SELECTION-SCREEN</b>, the initialization necessary for selection screens is not carried out, and the screen will not run properly when displayed.
    EG:<b>
    SELECTION-SCREEN BEGIN OF SCREEN 123 AS WINDOW TITLE TEXT-456.
      SELECTION-SCREEN BEGIN OF BLOCK BL1 WITH FRAME TITLE TEXT-BL1
                                          NO INTERVALS.
        SELECT-OPTIONS SEL1 FOR SY-SUBRC.
        PARAMETERS     PAR1 LIKE SPFLI-CARRID.
        SELECTION-SCREEN COMMENT /10(20) TEXT-COM.
      SELECTION-SCREEN END OF BLOCK BL1.
    SELECTION-SCREEN END OF SCREEN 123.
    CALL SELECTION-SCREEN 123 STARTING AT 20 5.
    IF SY-SUBRC = 0.
    ELSE.
    ENDIF.</b>
    rewards if useful,
    regards,
    nazeer

  • Difference between SUM values in adjoining rows

    Hi I've written following query:
    DECLARE @Decision_Group nvarchar(10) = 'All',
    @Entry_Month INT = 09,
    @In_Use CHAR(1) = 'Y',
    @Scheme nvarchar(05) = 'UGS',
    @Subject_Area nvarchar(10) = 'ART',
    @Location nvarchar(10) = 'UOB',
    @Home_Overseas nvarchar(05) = 'H'
    SELECT SUM(a.CONVERSION_EARLY) AS Early, SUM(a.CONVERSION_MIDDLE) AS Middle, SUM(a.CONVERSION_CLEARING) AS Clearing, a.AcademicYear
    FROM
    SELECT
    srs_cap.cap_ayrc AS AcademicYear
    ,CONVERSION_EARLY =
    CASE
    WHEN (srs_cap.cap_crtd < cast('02/10/' + left(srs_cap.cap_ayrc,4) AS dateTime)) THEN 1
    END
    ,CONVERSION_MIDDLE =
    CASE
    WHEN (
    srs_cap.cap_crtd < cast('08/01/' + left(srs_cap.cap_ayrc,4) AS dateTime) AND
    srs_cap.cap_crtd >= cast('02/10/' + left(srs_cap.cap_ayrc,4) AS dateTime)) THEN 1
    END
    ,CONVERSION_CLEARING =
    CASE WHEN (srs_cap.cap_crtd >= cast('08/01/' + left(srs_cap.cap_ayrc,4) AS dateTime)) THEN 1
    END
    FROM srs_cap
    LEFT JOIN srs_mcr ON srs_cap.cap_mcrc = srs_mcr.mcr_code
    LEFT JOIN srs_dsc ON srs_cap.cap_dscc = srs_dsc.dsc_code
    LEFT JOIN srs_mth ON srs_cap.cap_mthc = srs_mth.mth_code
    LEFT JOIN ins_lca ON srs_cap.cap_cgpc = ins_lca.lca_code
    LEFT JOIN men_xon ON men_xon.xon_oldv = srs_cap.cap_dptc
    LEFT JOIN ins_dpt ON srs_cap.cap_dptc=ins_dpt.dpt_code
    LEFT JOIN srs_sce ON srs_cap.cap_scjc = srs_sce.sce_scjc
    AND srs_cap.cap_ayrc = srs_sce.sce_ayrc
    WHERE cap_ayrc BETWEEN dbo.[GetAcademicYear-2] (getdate()) AND dbo.getnextacademicyear(getdate())
    AND (@Decision_Group='All' OR (@Decision_Group<>'A' AND RIGHT(srs_cap.cap_dscc,1) IN (left(@Decision_Group,1)) ))
    AND cap_mthc IN (@Entry_Month)
    AND srs_mcr.mcr_iuse IN (@In_Use)
    AND srs_cap.cap_schc IN (@Scheme)
    AND srs_cap.cap_dptc IN (@Subject_Area)
    AND srs_cap.cap_cgpc IN (@Location)
    AND srs_cap.cap_apcc IN (@Home_Overseas)
    AND (men_xon.xon_tabl='Academic Group' or men_xon.xon_tabl IS NULL)
    GROUP BY
    srs_cap.cap_ayrc,
    srs_cap.cap_crtd
    AS a
    GROUP BY
    AcademicYear
    This returns following data.
        Early
        Middle
      Clearing
    AcademicYear
    79
    58
      27    
       2012/13
    69
    58
    37
       2013/14
    75
    55
    30
       2014/15
    67
    6
          NULL
       2015/16
    Is there a simple way using windows functions to get the difference between Early 2012/13 and Early 2013/14, then Middle 2012/13 and Middle 2013/14 etc?
    Cheers, AndySugs

    Please follow basic Netiquette and post the DDL we need to answer t His. Follow industry and ANSI/ISO standards in your data. You should follow ISO-11179 rules for naming data elements. You are not even close. 
    You should follow ISO-8601 rules for displaying temporal data. We need to know the data types, keys and constraints on the table. You failed again and did it in the worst way! Is your '08/01/'  supposed to be “yyyy-08-01” or “yyyy-01-08” ? Who knows? This
    is why ANSI/ISO Standard SQL allows only the “yyyy-mm-dd” display format. 
    Avoid dialect in favor of ANSI/ISO Standard SQL. 
    Why did you treat temporal data like 1960's COBOL strings? And then you picked the worst possible display format! 
    Why do you write with assembly language flags? 
    Why did you write more left outer joins in ONE query than I have written in the last three years? Your DDL (which you did not post) would have to be total mess. 
    Why do you think that table names of less than 8 characters are maintainable? I am old and remember when file names had to be less than 8 characters but that was in the 1970's on magnetic tape file systems. 
    Why do you think that “cap_ayrc” is better than the ISO-1179 compliant “academic_year” that you had to alias it to? In RDBMS, a data element has one and only one name. This name does not contain meta data. The general syntax is “<attribute>_<attribute
    property>”
    The old Sybase/UNIX  getdate() should be CURRENT_TIMESTAMP today. 
    Competent SQL programmers do not use UDF. They do not port, the overhead is too great and they cannot be optimized. But VB, COBOL and programmers in other procedural languages use them to avoid learning declarative programming. This means your silly [Get_Academicyear-2]
    () and Get_Next_Academicyear() would be in a report period look-up table. SQL is a data base language so we use tables instead of computations. 
    Why did you write code like:
     S.cap_schc IN (@scheme_name) ?
    The IN() predicate implies that you are passing a list. But First Normal Form (1NF) uses scalars. That would be sooo wrong! 
    My guess is that when you fix the schema, this query would look more like this skeleton: 
    SELECT A.academic-year,
                SUM (CASE  WHEN (A.foobar_date < R.something_start_date)  
                         THEN 1 ELSE 0 END)) AS early_conversion_cnt, 
                SUM (CASE  WHEN (A.foobar_date BETWEEN R.something_start_date
                             AND R.something_end_date)  AS middle_conversion_date
                         THEN 1 ELSE 0 END)) AS early_conversion_cnt, 
                SUM (CASE  WHEN (A.foobar_date >  R.something_end_date)  
                         THEN 1 ELSE 0 END)) AS AS clearing_conversion_cnt
    FROM  Report_Periods AS R,  .. AS A
    WHERE  .. ;
    Do you want to follow the forum rules and try again with DDL and specs? Having taught SQL and having other credentials, I would say that you are 3-5 years from being a productive SQL programmer. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Tree selection (single selection model) but on 2 panels

    hi..
    here is my problem..
    I have 2 trees each with single selection mode.
    i add them to 2 scrollpanes and add these 2 scrollpanes to a split pane and divided them vertically.
    When i select the tree node in the upper pane the corresponding node is displayed as the root of the tree in lower pane, so far so fine.
    when i select the tree node in the lower pane the tree which was already selected in the upper pane is deselected. while i want that selection to remain..
    help me to solve this..
    thanx in advance..
    K�vi

    you can only have 1 focused component, but trees shouldn't lose selection just cuz they lose focus.... unless you have a custom cell renderer for the tree and you are using the wrong options to paint the cell selection with.

  • Difference between Federated single sign on  and just Single sign on

    Can anyone please give a clear definition of what is
    1. Federated Single sign on?
    2. Just Single Sign on ?
    As a security expert if you were to Architect security what will you suggest ?
    Lets take an example Landscape
    NW1(ABAP + JAVA)- system, NW-2(ABAP+JAVA)  system and EP( java only), LDAP
    I am having a hard time convincing the customer to have both CONSUMER AND PRODUCER PORTAL for Federated single sign on? is this a bad idea. Customer says just give me SSO(with just one portal acting as CONSUMER/PRODUCER).
    initial GOLIVE user load will be 700+ users.
    Edited by: Franklin Jayasim on Jul 16, 2010 7:52 PM
    Edited by: Franklin Jayasim on Jul 16, 2010 7:53 PM
    Edited by: Franklin Jayasim on Jul 16, 2010 7:57 PM
    Edited by: Franklin Jayasim on Jul 17, 2010 12:17 AM

    Hi  Denny Liao
    The project is going to have BI(NW) and ECC/SRM/HR(NW) and sepparate  portal ( EP - Java only )
    I thought that normal SSO will help in the intranetwork, what happens if the employee(user)  needs to work from home.
    What about the external vendors suppliers etc...?

  • Difference between Apple TV and Front Row?

    Right now I have a Mac Mini with Front Row hooked up to our 1080p HDTV. With Front Row we can watch any movies we've downloaded from iTunes and all our home movies on the TV and they look great. I've never used or seen an Apple TV in action. What more does it do than Front Row? Will the HD versions of movies for rent on iTunes only be available for the Apple TV?

    So it looks like the the only advantage on having the Apple TV is the HD video rental through iTunes. The pros on the MacMini far outweigh the pros on the Apple TV. It's just a matter of how much I want to be able to rent HD movies from iTunes. The MacMini can totally handle the HD content playback (I shoot HD home movies all the time and play them back on Front Row on our MacMini to the HDTV and it has no problem) so I wonder why they are restricting the HD video rentals to the Apple TV.
    And, by the way, you can connect the MacMini via HDMI by getting a DVI to HDMI cable and then taking the audio from the digital audio out. It's the way I have it set up now and it looks and sounds great.

Maybe you are looking for