Problem in Select Statment

I have two tables
<b>TAB1</b>
<u>F1</u>     <u>F2</u>
A1     AA
A2     AA
A3     BB
A4     AA
A5     AA
<b>TAB2</b>
<u>F1</u>     <u>F2</u>     <u>F3</u>
B1     AA     D1
B2     BB     D1
B3     CC     D1
B4     AA     D2
B5     AA     D3
B6     BB     D1
B7     AA     D1
B8     DD     D1
I use following statement
Select F1 from TAB1 where TAB1.F2 in (Select F2 from TAB2)
It’s working properly with my requirement.
My problem is now I want to get field F1 in TAB2 also. How can I get this?
Finally I needed result is
T<u>AB1-F1</u>     <u>TAB2-F1</u>
A1          B1     
A2          B1
A3          B2
A4          B1
A5          B1
Basically I want,  when TAB1-F2  data in TAB2-F2 field I want get TAB2-F1 field also.

hi Nelson.
Syntax
... [(] {dbtab_left [AS tabalias_left]} | join
{[INNER] JOIN}|{LEFT [OUTER] JOIN}
{dbtab_right [AS tabalias_right] ON join_cond} [)] ... .
Effect
The join syntax represents a recursively nestable join expression. A join expression consists of a left-hand and a right- hand side, which are joined either by means of [INNER] JOIN or LEFT [OUTER] JOIN . Depending on the type of join, a join expression can be either an inner ( INNER) or an outer (LEFT OUTER) join. Every join expression can be enclosed in round brackets. If a join expression is used, the SELECT command circumvents SAP buffering.
On the left-hand side, either a single database table, a view dbtab_left, or a join expression join can be specified. On the right-hand side, a single database table or a view dbtab_right as well as join conditions join_cond can be specified after ON. In this way, a maximum of 24 join expressions that join 25 database tables or views with each other can be specified after FROM.
AS can be used to specify an alternative table name tabalias for each of the specified database table names or for every view. A database table or a view can occur multiple times within a join expression and, in this case, have various alternative names.
The syntax of the join conditions join_cond is the same as that of the sql_cond conditions after the addition WHERE, with the following differences:
At least one comparison must be specified after ON.
Individual comparisons may be joined using AND only.
All comparisons must contain a column in the database table or the view dbtab_right on the right-hand side as an operand.
The following language elements may not be used: BETWEEN, LIKE, IN.
No sub-queries may be used.
For outer joins, only equality comparisons (=, EQ) are possible.
If an outer join occurs after FROM, the join condition of every join expression must contain at least one comparison between columns on the left-hand and the right-hand side.
In outer joins, all comparisons that contain columns as operands in the database table or the view dbtab_right on the right-hand side must be specified in the corresponding join condition. In the WHERE condition of the same SELECT command, these columns are not allowed as operands.
Resulting set for inner join
The inner join joins the columns of every selected line on the left- hand side with the columns of all lines on the right-hand side that jointly fulfil the join_cond condition. A line in the resulting set is created for every such line on the right-hand side. The content of the column on the left-hand side may be duplicated in this case. If none of the lines on the right-hand side fulfils the join_cond condition, no line is created in the resulting set.
Resulting set for outer join
The outer join basically creates the same resulting set as the inner join, with the difference that at least one line is created in the resulting set for every selected line on the left-hand side, even if no line on the right-hand side fulfils the join_cond condition. The columns on the right-hand side that do not fulfil the join_cond condition are filled with null values.
Example
Join the columns carrname, connid, fldate of the database tables scarr, spfli and sflight by means of two inner joins. A list is created of the flights from p_cityfr to p_cityto. Alternative names are used for every table.
PARAMETERS: p_cityfr TYPE spfli-cityfrom,
p_cityto TYPE spfli-cityto.
DATA: BEGIN OF wa,
fldate TYPE sflight-fldate,
carrname TYPE scarr-carrname,
connid TYPE spfli-connid,
END OF wa.
DATA itab LIKE SORTED TABLE OF wa
WITH UNIQUE KEY fldate carrname connid.
SELECT ccarrname pconnid f~fldate
INTO CORRESPONDING FIELDS OF TABLE itab
FROM ( ( scarr AS c
INNER JOIN spfli AS p ON pcarrid = ccarrid
AND p~cityfrom = p_cityfr
AND p~cityto = p_cityto )
INNER JOIN sflight AS f ON fcarrid = pcarrid
AND fconnid = pconnid ).
LOOP AT itab INTO wa.
WRITE: / wa-fldate, wa-carrname, wa-connid.
ENDLOOP.
Example
Join the columns carrid, carrname and connid of the database tables scarr and spfli using an outer join. The column connid is set to the null value for all flights that do not fly from p_cityfr. This null value is then converted to the appropriate initial value when it is transferred to the assigned data object. The LOOP returns all airlines that do not fly from p_cityfr.
PARAMETERS p_cityfr TYPE spfli-cityfrom.
DATA: BEGIN OF wa,
carrid TYPE scarr-carrid,
carrname TYPE scarr-carrname,
connid TYPE spfli-connid,
END OF wa,
itab LIKE SORTED TABLE OF wa
WITH NON-UNIQUE KEY carrid.
SELECT scarrid scarrname p~connid
INTO CORRESPONDING FIELDS OF TABLE itab
FROM scarr AS s
LEFT OUTER JOIN spfli AS p ON scarrid = pcarrid
AND p~cityfrom = p_cityfr.
LOOP AT itab INTO wa.
IF wa-connid = '0000'.
WRITE: / wa-carrid, wa-carrname.
ENDIF.
ENDLOOP.
we r using 2 type of joins in abap they are
1) inner join.
this will join 2 tables using an common fiend and return the result with field values wich are common in both the tables
itab1 itab2
a b c a d
1 2 3 1 5
2 3 4 3 6
after innerjoining itab1 n itab2 on field a we wil get the o/p as
a b c d
1 2 3 5
only common field is taken..
2)left outer join
here it wil work in opossite way it will give values whic are not common
itab1 itab2
a b c a d
1 2 3 1 5
2 3 4 3 6
after left outer joining itab1 n itab2 on field a we wil get the o/p as
a b c d
2 3 4
only fields which are not common is taken from the left table..other field(d here) wil be empty
I think it will help u.
Reward Points if helpful.
regards,
Amber s

Similar Messages

  • Problem in select  statment & loop of itab.

    Hi all,
          I am having on ITAB1  for, ex which is having five line items or more  .
    iam also using select statment SINGLE statment for 7 times ,to select values for
    different data base  table.
    for ex,
    loop at itab.
       1---> SELECT SINGLE Z_CTRY_ORIG INTO LS_PSHDESN-Z_CTRY_ORIG FROM ZLE_PART_MST
      WHERE                           WERKS        = ITAB1-LGNUM
      AND                                 MATNR        = ITAB1-MATNR .
    2---
    3---
    4---
    endloop
    i want to remove from the loop statment  and i have to select  the datas ..
    can any one sugesset some possible ways....
    regards
    veera

    hi,
    Solution:
    Never use select single in loop at itab!! for that :
    Solution 1:
    say ur main table is ITAB and rferring  this u want to select data from other tables.
    SELECT SINGLE Z_CTRY_ORIG INTO LS_PSHDESN-Z_CTRY_ORIG FROM ZLE_PART_MST
    into table itab2
    FOR ALL ENTRIES IN ITAB
    WHERE WERKS = ITAB-LGNUM
    AND MATNR = ITAB-MATNR.
    With this what will hapeen , u will get all records in itab2 which u can update itab1(master) using loop.
    solution 2:
    Instead of all this use JOINs in select statement properly and u can fetch data in one shot this will reduce database load as well as abap load ( More than 3 joins in SELECT stmt  are not recommeded but can be used)
    I believe this is perfect solution if and only if u are giving joins on KEY fields only.  Same is applied for wherer clause.
    Hope this will help u, if not revert.
    Jogdand M B

  • Problem in select statment writing

    Hi,
    I have two tables.
    P_PLAN_ITEM_DTL --> A table
    P_SCHDLE_ITEM_UPLOAD --> B table
    A and B tables contain same structure.
    A table contain Lot of records. B contain data or may not contanain data.
    If B contain records then data should filter based on B table
    If B contain doest not contain records then data should come from A table.
    Please do the needful.

    Hi,
    MST wrote:
    Hi,
    I have two tables.
    P_PLAN_ITEM_DTL --> A table
    P_SCHDLE_ITEM_UPLOAD --> B table
    A and B tables contain same structure.
    A table contain Lot of records. B contain data or may not contanain data.
    If B contain records then data should filter based on B table
    If B contain doest not contain records then data should come from A table.That sounds like a job for an outer join, and the NVL (or COALESCE) function.
    See {message:id=9360002}

  • Performace problem in a select statment how to imporve the performance

    fist select statment
    SELECT    a~extno
              a~guid_lclic       " for next select
              e~ctsim
              e~ctsex
    *revised spec 3rd
              f~guid_pobj
              f~amnt_flt
              f~amcur
              f~guid_mobj
              e~srvll     "pk
              e~ctsty     "PK
              e~lgreg  "PK
      INTO TABLE gt_sagmeld
      FROM /SAPSLL/LCLIC  as a
      INNER JOIN /sapsll/tlegsv as e on elgreg = algreg
    * revised spec 3rd
      inner join /sapsll/legcon as f on fguid_lclic = aguid_lclic   " for ccngn1 selection
      inner join /sapsll/corcts as g on gguid_pobj = fguid_pobj
                               where   a~extno in s_extno.
      sort gt_sagmeld by guid_lclic guid_pobj.
    lgreg ctsty srvll
      delete adjacent duplicates from gt_sagmeld comparing guid_lclic guid_pobj.
    it selects about 20 lakh records
    belos select statment whichs is taking time as it is based on the entreis of gt_sagmeld
    select /sapsll/corpar~guid_mobj
                /sapsll/corpar~PAFCT
                but000~bpext
                but000~partner
                /sapsll/corpar~parno
                into table gt_but001
        from    /sapsll/corpar
        INNER join but000  on  but000partner = /sapsll/corparparno
        for all entries in gt_sagmeld
        where  /sapsll/corpar~guid_mobj = gt_sagmeld-guid_mobj
        and    /sapsll/corpar~PAFCT = 'SH'.
       SELECT /sapsll/cuit~guid_cuit         " PK
              /sapsll/cuit~QUANT_FLT         " to be displayed
              /sapsll/cuit~QUAUM             " to be displayed
              /sapsll/cuit~RPTDT             " to be displayed
             /sapsll/cuhd~guid_cuhd         " next select
              /sapsll/cuit~guid_pr           " next select
      INTO table gt_sapsllcuit
      FROM  /sapsll/cuit
    inner join /sapsll/cuhd on /sapsll/cuitguid_cuhd = /sapsll/cuhdguid_cuhd
      FOR all entries in gt_sagmeld
      WHERE /sapsll/cuit~guid_cuit = gt_sagmeld-guid_pobj.
      Delete adjacent duplicates from gt_sapsllcuit[].
           if not gt_sapsllcuit[] is initial.

    hi navenet
    that didnt worked
    we need to try ur range options
    but not sure what you told in the last mail as not clear with range can u pls eloboragte more i am pasting the full code here
    SELECT     a~extno
               a~guid_lclic       " for next select but000
               e~ctsim
               e~ctsex
               e~srvll
               e~ctsty
               e~lgreg
      INTO TABLE gt_sagmeld
      FROM /SAPSLL/LCLIC  as a
      INNER JOIN /sapsll/tlegsv as e on elgreg = algreg
                               where   a~extno in s_extno.
    sort gt_sagmeld by guid_lclic.
    delete adjacent duplicates from gt_sagmeld comparing all fields.
      IF not gt_sagmeld[] is initial.
      SELECT  /sapsll/legcon~guid_lclic
              /sapsll/legcon~guid_pobj
              /sapsll/legcon~amnt_flt
              /sapsll/legcon~amcur
               but000~bpext
               *revised spec
               /sapsll/corpar~PAFCT
              /sapsll/legcon~guid_mobj
             /sapsll/cuit~guid_cuit
      INTO TABLE gt_but000
      FROM /SAPSLL/LEGCON
      for all entries in gt_sagmeld
      where /SAPSLL/legcon~guid_lclic = gt_sagmeld-guid_lclic.
            IF NOT GT_BUT000[] IS INITIAL.
           sort gt_but000 by guid_mobj.
           delete adjacent duplicates from gt_but000 comparing guid_mobj.
         select /sapsll/corpar~guid_mobj
                /sapsll/corpar~PAFCT
                /sapsll/corpar~parno
                into table gt_but001
        from    /sapsll/corpar
        for all entries in gt_but000
        where  /sapsll/corpar~guid_mobj = gt_but000-guid_mobj.
       and    /sapsll/corpar~PAFCT = 'SH'.
    DELETE gt_but001 where PAFCT <> 'SH'.
    *sort gt_corpar by parno.
    *delete adjacent duplicates from gt_corpar comparing parno.
    *select gd000~partner
          gd000~bpext
         from gd000 into table gt_but001
    for all entries in gt_corpar
    where  gd000~partner = gt_corpar-parno.
    my ultimat aim is to select bpext from gd000
    can u please explain how to use ranges here and what is the singnificance and how ill i read the data from the final  table if we use ranges
    regards
    Nishant

  • Select statment problem

    Hi all,
    I am trying to put select statment into another select statment.
    Select column1
    ,column2
    ,column3
    ,(select column1 from table1,table2,table3 where condotions...)
    ,column4
    from table 1.
    its giving me error.
    Please help me...its urgent.
    Surender

    SQL> select deptno,dname,(select ename from emp) from dept;
    select deptno,dname,(select ename from emp) from dept
    ERROR at line 1:
    ORA-01427: single-row subquery returns more than one row
    SQL> select deptno,dname,(select ename from emp where empno=7934) from dept
    DEPTNO DNAME (SELECTENA
    10 ACCOUNTING MILLER
    20 RESEARCH MILLER
    30 SALES MILLER
    40 OPERATIONS MILLER
    In your case subquery is returning more than one row. It should not be.
    -aijaz
    Message was edited by:
    [email protected]

  • Problem with Select

    Hi All,
    I am Facing one problem in select query. My requirement is as follows.
    User Screen will Have 4 Fileds.
    Country Code, Zip Code From, Zip Code To, Delivery Area.
    All are Parameter's only.
    For Example ZTABLE having below Entries.
    US  12345-6787  12345-6789   AKRON             AKRON/CANTON
    Once User try to create new entry by Click on SAVE, Below Possiblities are there.
    Case 1: US  12345-6787  12345-6789   AKRON             AKRON/CANTON ( Error Message)
    Case 2: US  12345-6786  12345-6787   AKRON             AKRON/CANTON ( Error Message)
    Case 3: US  12345-6789  12345-6790   AKRON             AKRON/CANTON ( Error Message)
    Case 4: US  12345-6789  12345-6790   AKRON             AKRON/CANTON ( Error Message)
    Case 5: US  12345-6786  12345-6787   AKRON             AKRON/CANTON ( Error Message)
    Case 6: US  12345-6785  12345-6786   AKRON             AKRON/CANTON ( Record Need To Insert)
    Case 7: US  12345-6785  12345-6785   AKRON             AKRON/CANTON ( Record Need To Insert)
    Case 8: US  12345-6790  12345-6790   AKRON             AKRON/CANTON ( Record Need To Insert)
    Case 9: US  12345-6790  12345-6791   AKRON             AKRON/CANTON ( Record Need To Insert)
    Case 10: US  12345-6788  12345-6788   AKRON             AKRON/CANTON ( Error Message)(This Condition is Failing)
    Case 11: US  12345-6788  12345-6789   AKRON             AKRON/CANTON ( Error Message)(This Condition is Failing)
    In the above cases 10 and 11 is failing.
    I am using the below select statment.
    SELECT SINGLE * FROM zdt_sd_dlv_zcode   WHERE mandt = sy-mandt
                                              AND land1 = g_land1
                                              AND ( post_code_from GE g_pbox_from AND post_code_from LE g_pbox_to )
                                              OR ( post_code_to GE g_pbox_from AND post_code_to LE g_pbox_to ).
    Friends can anyone give me some valuable inputs to solve this problem.
    Points will reward.
    Thanks in Advance,
    Srinivas.

    Please use Select-options instead of Parameters so that you can use complex "and" and "or" in your select statements.
    for eg:if you are declaring parameters like this below.
    parameters post_code1  LIKE adrc-post_code1.
    change to
    select-options post_code1 for  adrc-post_code1 no intervals.
    siddu

  • How does "SELECT" statment  work?

    Hi,
    Correct me if I'm wrong.
    Data selected by SELECT statement  (without ORDER BY) is unordered and sequence of selected lines may differ every time you execute the same SELECT.
    My problem is that data on a production system has been always selected ordered ( without ORDER BY)  and suddenly it changes and the rows of a result set are unordered.
    It's also strange for me that it works differently on a test system and data is selected ordered ( the code is the same on both systems ).
    Two questions:
    1. How is it possible that data was always selected ordered? (the only answer which comes to my head is "LUCK" )
    2. What has happened that data is now selected unordered? (and works as SELECT statment should work by definition)
    Thanks for any ideas,
    Mario

    Hello,
    I see there is an equality 3-3 in the match here, between
    1) those who are for "it's ordered" (Rodrigo Ariel G..., Danish2285, pavankumar.g)
    2) and those "it's not ordered" (Diwakar Aggarwal, Keshav.T, Matt).
    So I'd like to play too :-D and my answer is "it's not ordered" (with Diwakar Aggarwal, Keshav.T, Matt).
    now 3-4
    My advice is: always trust the SAP documentation when it's said explicitly (I'm aware that the arguments or context are sometimes missing, so a confirmation is then needed).
    You'll find it also in the wikipedia for SQL article (http://en.wikipedia.org/wiki/SQL#Queries): "The ORDER BY clause identifies which columns are used to sort the resulting data, and in which direction they should be sorted (options are ascending or descending). Without an ORDER BY clause, the order of rows returned by an SQL query is undefined."
    Oracle SQL Reference, in the Query Optimizer section (http://download.oracle.com/docs/cd/B14117_01/server.101/b10752/optimops.htm#35891) : "If data must be sorted by order, then use the ORDER BY clause, and do not rely on an index. If an index can be used to satisfy an ORDER BY clause, then the optimizer uses this option and avoids a sort."
    In fact, this is logic when we know how RDBMS are built, all this is about the selection of the access path to get the data (that we see with the explain plan, the path depends especially on what the database contains, that is different between test and production), the faster way to do things (an ordering is not always required, so why the RDBMS would spend time to organize it)
    Don't we have this question in the Forum's FAQ by the way?
    Sandra

  • Problem with "SELECT...FOR UPDATE OF..." and "POST command" combination

    Problem with "SELECT...FOR UPDATE OF..." and "POST command" combination
    Problem in committing transactions in Multiple Forms (Oracle Forms) with POST built-in command:
    Consider that the following statements are written in WHEN-WINDOW-CLOSED trigger of a called form.
    Statements in called form (Form name: FORM_CHILD):
    go_block('display_block') ;
    do_key('execute_query') ;
    -- Data from table_b will be populated in this block, based on the value of COLUMN_1 obtained
    -- from TABLE_A.
    -- Example: If the value of COLUMN_1 is 10, then all the matching records from TABLE_B, which
    -- are inserted with value 10 in TABLE_B.COLUMN_1 will be fetched and shown here.
    if user_choice = 'YES' then
    commit ;
    else
    rollback ;
    end if ;
    Statements in calling forms:
    There are two calling forms having following statements and it is going to call the above said called form.
    CALLING FORM 1
    Statements in KEY-COMMIT trigger:
    post;
    call_form(form_child, no_activate) ;
    Statements in ON-INSERT trigger:
    select column_1
    from table_a
    for update of column_1
    where column_2 = 'X' ;
    update table_a
    set column_1 = column_1 + 1
    where column_2 = 'X' ;
    insert into table_b ...;
    insert into table_b ...; Statements in KEY-COMMIT trigger:
    post;
    call_form(form_child, no_activate) ;
    CALLING FORM 2:
    Statements in ON-INSERT trigger:
    select column_1
    from table_a
    for update of column_1
    where column_2 = 'X' ;
    update table_a
    set column_1 = column_1 + 1
    where column_2 = 'X' ;
    insert into table_b ...;
    insert into table_b ...;
    insert into table_b ...;
    Our understanding:
    Assume that both the forms are running from two different machines/instances, issuing commit at the same time. In this case, forms will start executing the statements written in ON-INSERT trigger, the moment POST command is executed. Though the commit is issued at the same time, according to oracle, only one of the request will be taken for processing first. Assume that calling form 1 is getting processed first.
    So, it fetches the value available in COLUMN_1 of TABLE_A and locks the row from further select, update, etc. as SELECT...FOR UPDATE command is used (note that NOWAIT is not given, hence the lock will be released only when COMMIT or ROLLBACK happens) and proceed executing further INSERT statements. Because of the lock provided by the SELECT...FOR UPDATE command, the statements in calling form 2 will wait for the resource.
    After executing the INSERT statements, the FORM_CHILD is called. The rows inserted in to TABLE_A will be queried and shown. The database changes will be committed when user closes the window (as COMMIT is issued in its WHEN-WINDOW-CLOSED trigger). Then the SELECT...FOR UPDATE lock will be released and calling form 2's statements will be executed.
    Actual happenings or Mis-behavior:
    Calling form 2 starts executing INSERT statements instead of waiting for SELECT...FOR UPDATE lock. Also, the value selected from TABLE_A.COLUMN_1 is same in both the calling forms, which is wrong.
    The rows inserted into TABLE_B are having similar COLUMN_1 values in calling form 2 and they are fetched and shown in the called form FORM_CHILD.
    Note that in calling form 2 also POST only is issued, but the changes posted there are accessible in calling form 1 also, which is wrong.
    Kindly suggest us as to how to fix above problem. It will be much use, if you can send us the information regarding the behavior of Oracle Forms POST built-in also.
    Our mail ID: [email protected]
    Thanks a lot in advance.

    You have several problems:
    1. On-Insert will ONLY run if you have created a new record in a base-table block. If you haven't done that, then the POST command will not cause it to run.
    2. Select for update without a "no wait" will lock records for the first form, but when the second form tries this, it will hit the ORA-00054 exception, and will NOT wait. The only way you could make it wait is to issue an UPDATE sql command, which is not such a good way to go.
    All POST does is issues SQL insert or update commands for any changes the user has made to records in a form's base-table blocks, without following with a Commit command.
    Also understand that Commit is the same as Commit_Form, and Rollback is the same as Clear_Form. You should read up on these in the Forms help topics.

  • I'm having problems (1)selecting onscreen text, (2) having problems resizing menu boxes and selecting menues with the cursor. I'm not able to select menus and move them. I'm not sure how to correct this.

    I'm having problems (1) selecting onscreen text, (2) resizing menu boxes and selecting menues with the cursor. I'm not able to select menus and move them. I'm not sure how to correct this.

    1) This is because of software version 1.1. See this
    thread for some options as to how to go back to 1.0,
    which will correct the problem...
    http://discussions.apple.com/thread.jspa?threadID=3754
    59&tstart=0
    2) This tends to happen after videos. Give the iPod a
    minute or two to readjust. It should now be more
    accurate.
    3) This?
    iPod shows a folder icon with exclamation
    point
    4) Restore the iPod
    5) Try these...
    iPod Only Shows An Apple Logo and Will Not Start
    Up
    iPod Only Shows An Apple Logo
    I think 3,4, and 5 are related. Try the options I
    posted for each one.
    btabz
    I just noticed that one of the restore methods you posted was to put it into Disk Mode First rather than just use the resstore straight off, I Have tried that and seems to have solved the problem, If it has thank you. previously I have only tried just restoring it skipping this extra step. Hope my iPod stays healthy, if it doesnt its a warrenty job me thinks any way thanks again

  • Query in select statment

    Hi ,
        what is the difference between,select single and
    select upto one row .
    In a select statment .
    Thanks ,
    shankar.

    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.
    You can refer to the below link..
    http://www.sap-img.com/abap/difference-between-select-single-and-select-upto-one-rows.htm

  • Problem with selecting text in Adobe Reader XI

    Hi all, I am encountering a problem with Adobe Reader XI and it is very strange I could not find an alike issue on the internet so I guess I have to submit a question with it.
    So here it is, I am using Adobe Reader XI Version 11.0.2, operating system: Windows 7. I do not know it starts from when but it has the problem with selecting text - to be copied in pdf documents. I ensure that the documents are not scanned documents but word-based documents (or whatever you call it, sorry I cannot think of a proper name for it).
    Normally, you will select the text/paragraph you want to copy and the text/paragraph will be highlighted, but the problem in this case that I cannot select the text/paragraph, the blinking pointer (| <-- blinking pointer) will just stays at the same location so I cannot select/highlight anything to be copied. It happens oftenly, not all the time but 90%.
    This is very annoying as my work involves very much with copying text from pdf documents, I have to close the pdf file and then open it again so I can select the text but then after the first copying or second (if I am lucky), the problem happens again. For a few text I have to type it myself, for a paragraph I have to close all opening pdf documents and open again so I could select the paragraph to copy. I ran out of my patience for this, it causes trouble and extra time for me just to copying those texts from pdf documents. Does this problem happen to anyone and do you have a solution for this? I would much appreciate if you could help me out, thank you!

    Yeah,  I totally agree, this is very strange. I have always been using Adobe Reader but this problem only occurred ~three months ago. It must be that some software newly installed I think. But I have no idea.
    About your additional question, after selecting the texts and Ctrl + C, the texts are copied and nothing strange happens. It's just that right after I managed to copy the texts, it takes me a while to be able to select the texts again. For your information, I just tested to select the texts and then pressed Ctrl, the problem happened. And then I tried pressing C and then others letters, it all led to the problem.
    I guess I have to stick with left-clicked + Copy until I/someone figure the source of this problem. Thanks a lot for your help!

  • Problem with:  select 'c' as X from dual

    Problem with 'select 'c' as X from dual'
    I get 2 different results when I execute the above with SQLPlus (or java) depending on the instance I am connected to. For one instance the result is a single character and for the other the character is padded with blanks to 32 chars in the SQLPlus window (and java). Does anyone know what database setting causes this to happen? Is it a version issue ?
    Test #1: Oracle 9.2.0.6 - SQLPlus result is padded with blanks
    SQL*Plus: Release 9.2.0.1.0 - Production on Mon Dec 10 09:27:58 2007
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
    With the Partitioning option
    JServer Release 9.2.0.6.0 - Production
    SQL> select 'c' as X from dual;
    X
    c
    SQL>
    Test #2 Oracle 9.2.0.1 SQLPlus result is a single character.
    SQL*Plus: Release 9.2.0.1.0 - Production on Mon Dec 10 09:29:27 2007
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    SQL> select 'c' as X from dual;
    X
    c
    SQL>

    Using 9.2.0.6 On AIX 5.2 I get the single byte result:
    UT1 > select 'c' as X from dual;
    X
    c
    If the databases are on different Oracle Homes you may want to check the sqlplus global logon files for any set commands.
    If you executed the two sql statements from different OS directories you may also want to check your sqlpath for sqlplus .logon files.
    Try issueing clear columns and repeating the statement. Are the results the same?
    HTH -- Mark D Powell --

  • Problem in Selection Screen.

    Dear Experts,
    I am facing a problem in Selection Screen.
    <b>I have 2 radio buttons ,</b>
    <b>Radio Button 1</b> - Choosing the file from desktop and
    <b>Radio Button 2</b> - Executing from Database
    Under Option1 - i have a <b>FILE</b> parameter which is <b><u>Mandatory.</u></b>
    Problem Case -
    <b>when I choose option 2, Option 1 should be disabled. in the sense the file name which is mandatory here should not be mandatory . Currently, when i choose option 2 - i have to provide some dummy characters in the file parameter because the file parameter is mandatory, and <u><b>I want to avoid this.</b></u>
    Please see the entire code .</b>
    REPORT ZTEST.
    DATA: LV_FILE_PATH(20) TYPE  C.
    DATA: LV_MASK(20)      TYPE  C VALUE   ',*.XLS ,*.XLS.     '.
    *-- Macro to put radiobutton on selection screen
    *-- &1 - radiobutton parameter name
    *-- &2 - text element (description)
    *-- &3 - radiobutton group
    DEFINE MAKE_RADIOBUTTON.
      SELECTION-SCREEN BEGIN OF LINE.
      PARAMETERS: &1 RADIOBUTTON GROUP &3.
      SELECTION-SCREEN COMMENT 3(60) &2.
      SELECTION-SCREEN END OF LINE.
    END-OF-DEFINITION.
    SELECTION-SCREEN BEGIN OF BLOCK A0 WITH FRAME TITLE T000.
    * From Config File
    MAKE_RADIOBUTTON RB_1  ALL_DATA SRC.
    SELECTION-SCREEN BEGIN OF BLOCK A1 WITH FRAME TITLE T001.
    * Config file from Presentation server
    PARAMETERS: P_FILE1   LIKE T390D-DBNAME  OBLIGATORY. "
    SELECTION-SCREEN END OF BLOCK A1.
    * From database table
    MAKE_RADIOBUTTON RB_2 INC_DOWN SRC.
    SELECTION-SCREEN END OF BLOCK A0.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE1.
      CALL FUNCTION 'WS_QUERY'
           EXPORTING
                QUERY  = 'CD'  "// Current Directory
           IMPORTING
                RETURN = LV_FILE_PATH.
      CALL FUNCTION 'WS_FILENAME_GET'
           EXPORTING
                DEF_FILENAME     = 'TA_DOWNLOAD.MDB'
                DEF_PATH         = LV_FILE_PATH
                MASK             = LV_MASK
                MODE             = 'O'
           IMPORTING
                FILENAME         = P_FILE1
           EXCEPTIONS
                INV_WINSYS       = 1
                NO_BATCH         = 2
                SELECTION_CANCEL = 3
                SELECTION_ERROR  = 4
                OTHERS           = 5.
    INITIALIZATION.
      ALL_DATA = 'From Desktop     : ? '.
      INC_DOWN = 'From Database    : ?'.
      T000     = 'Configuration Upload'.
    Please help
    Thanks

    Hi
    You should do some modifications like these:
    DEFINE MAKE_RADIOBUTTON_1.
      SELECTION-SCREEN BEGIN OF LINE.
      PARAMETERS: &1 RADIOBUTTON GROUP &3 USER-COMMAND &4.
      SELECTION-SCREEN COMMENT 3(60) &2.
      SELECTION-SCREEN END OF LINE.
    END-OF-DEFINITION.
    DEFINE MAKE_RADIOBUTTON_2.
      SELECTION-SCREEN BEGIN OF LINE.
      PARAMETERS: &1 RADIOBUTTON GROUP &3.
      SELECTION-SCREEN COMMENT 3(60) &2.
      SELECTION-SCREEN END OF LINE.
    END-OF-DEFINITION.
    SELECTION-SCREEN BEGIN OF BLOCK A0 WITH FRAME TITLE T000.
    From Config File
    MAKE_RADIOBUTTON_1 RB_1  ALL_DATA SRC AAA.
    SELECTION-SCREEN BEGIN OF BLOCK A1 WITH FRAME TITLE T001.
    Config file from Presentation server
    PARAMETERS: P_FILE1   LIKE T390D-DBNAME MODIF ID FIL. "
    SELECTION-SCREEN END OF BLOCK A1.
    From database table
    MAKE_RADIOBUTTON_2 RB_2 INC_DOWN SRC.
    SELECTION-SCREEN END OF BLOCK A0.
    AT SELECTION-SCREEN OUTPUT.
      IF RB_2 = 'X'.
        LOOP AT SCREEN.
          IF SCREEN-GROUP1 = 'FIL'.
            SCREEN-ACTIVE = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    Max

  • Performance problem with selecting records from BSEG and KONV

    Hi,
    I am having performance problem while  selecting records from BSEG and KONV table. As these two tables have large amount of data , they are taking lot of time . Can anyone help me in improving the performance . Thanks in advance .
    Regards,
    Prashant

    Hi,
    Some steps to improve performance
    SOME STEPS USED TO IMPROVE UR PERFORMANCE:
    1. Avoid using SELECT...ENDSELECT... construct and use SELECT ... INTO TABLE.
    2. Use WHERE clause in your SELECT statement to restrict the volume of data retrieved.
    3. Design your Query to Use as much index fields as possible from left to right in your WHERE statement
    4. Use FOR ALL ENTRIES in your SELECT statement to retrieve the matching records at one shot.
    5. Avoid using nested SELECT statement SELECT within LOOPs.
    6. Avoid using INTO CORRESPONDING FIELDS OF TABLE. Instead use INTO TABLE.
    7. Avoid using SELECT * and Select only the required fields from the table.
    8. Avoid nested loops when working with large internal tables.
    9. Use assign instead of into in LOOPs for table types with large work areas
    10. When in doubt call transaction SE30 and use the examples and check your code
    11. Whenever using READ TABLE use BINARY SEARCH addition to speed up the search. Be sure to sort the internal table before binary search. This is a general thumb rule but typically if you are sure that the data in internal table is less than 200 entries you need not do SORT and use BINARY SEARCH since this is an overhead in performance.
    12. Use "CHECK" instead of IF/ENDIF whenever possible.
    13. Use "CASE" instead of IF/ENDIF whenever possible.
    14. Use "MOVE" with individual variable/field moves instead of "MOVE-
    CORRESPONDING" creates more coding but is more effcient.

  • A problem highlighting/selecting text in Illustrator CS3

    In several instances I can't highlight text to copy or to edit, other times it works fine. If I click the radio button for the text in layers (other layers may be locked to prevent accidental selection), the baselines appears and I should be able to highlight the text, but I can't. If I highlight some other unaffected area of text successfully (unlocked layers), sometimes it will allow me to select the problem text directly after. Then it will go back to being a problem, why?

    I'm using the general text tool, I've locked the other sublayers to avoid accidentally selecting those items. Then I click the radio button on the sublayer I wish to edit or copy, which reveals the baselines. Then if I click within that object to highlight text with the cursor, the text tool creates a new textbox/sublayer and does not highlight the text I intended.
    From: Monika Gause <[email protected]<mailto:[email protected]>>
    Reply-To: <[email protected]<mailto:[email protected]>>
    Date: Wed, 26 Oct 2011 14:49:40 -0600
    To: Roger Daleiden <[email protected]<mailto:[email protected]>>
    Subject: A problem highlighting/selecting text in Illustrator CS3
    Re: A problem highlighting/selecting text in Illustrator CS3
    created by Monika Gause<http://forums.adobe.com/people/Monika+Gause> in Illustrator - View the full discussion<http://forums.adobe.com/message/3992086#3992086

Maybe you are looking for

  • The USB drive on my computer is no longer working. How can I transfer my iPod libarary to another computer

    The USB drive on my computer is no longer working. How can I transfer my iPod library to another computer.

  • Run Smart Index Wizard more than once?

    Afternoon all, RH8 generating WebHelp. Quick question on how the Smart Index Wizard works. I've run it once, made no changes to any topic, ran it again and got many more entries added to the Index. So, should one run the Smart Index Wizard multiple t

  • Havinf problem with my oracle transaction.Error: InvalidOperationException.

    I use the same oraclecommand for different 2 sql statements in one transaction. One is a simple select, another is an insert. What i wantto do is to select relevant data from related table(by select statement) and insert it into another one(by insert

  • Syncin iPhone to iTunes...

    I recently formatted my computer and installed a new iTunes. When I connect my iPhone, iTune doesn't shows my old apps and songs. How can I sync my old apps and songs from iPhone 4s to my computer?

  • All Sites Disappeared

    Hi - I'm using Dreamweaver MX on Leopard. It seems that when I did my last software update (10.5.3) all of my sites vanished from my site list. Everything is gone. Is there a simple way to tell DW how to rebuild my sites? In my EDIT SITES window ther