Question about select query.

Hi,
i want to insert the result of query to a table,
all the fields are corresponding except one field.
is there a way to this or i need to do
insert ( f1 , f2 ....)
i did this way
INTO CORRESPONDING FIELDS OF TABLE It_Return_Date
but i have another field which i want to insert to table.
is it possible??
10X

lets say you are getting values from a table
select & into X_TAB1 from TAB1.
data : x_tab2 type table2.
x_tab2-newfield = 'new value'. "Populate that new field value
move corresponding X_TAB1 TO X_TAB2. "all other will copy here
then use X_TAB2 to insert to your TABLE2.
INSERT TABLE2 FROM X_TAB2.
it would be a good practice to use same structure of the table while you use Insert/modify etc.. commands.
else you can declare TABLES ZTABLE2.
MOVE CORRESPONDING ZTABLE1 TO ZTABLE2.
ZTABLE2-NEW_FIELD = <NEW VALUE>.
then use INSERT.
INSERT ZTABLE2.
Regards
srikanth
Message was edited by: Srikanth Kidambi

Similar Messages

  • Question about selecting vector paths in Photoshop

    Hi, I have a question about selecting path points in photoshop.
    This is the setup. I have a vector shape layer (the redi circle). but that's placed inside a group with a vector mask (the black pentagon). What I want to do is select parts of the red circle using click and drag) so I can modify portions of the circle).
    This is Photoshop's behavior as I've noticed it. Photoshop likes to select the shapes for you, and will target layers on its own when you use the Path Selection Tool. It tends to want to select the top most shape. If I target the shape layer first, I can use the Direct Selection tool to select individual points. I can add selected points bu shift+clicking.This is all well and good.
    If I try to select multiple points using click+drag though, it gets a bit weird.
    If I try to click+drag to select multiple points from within the vector mask (from the black), it will fail and select the vector mask. If i try to click+drag to select multiple points from outside the vector mask (from the white), then it will allow me to select points from my vector shape like i intended.
    I could also shift click to hide the vector mask, and it will work the way i want.
    Is there an easy way to tell photoshop not to auto target vector shapes? or a better way to select paths inside vector masks?
    Thanx for any input

    canvai wrote:
    Is there an easy way to tell photoshop not to auto target vector shapes? or a better way to select paths inside vector masks?
    Sure.
    Simply click once on the vector mask for the shape layer (red circle) to highlight that vector mask in the Layers Panel. Then when you click-drag the anchors of that path will be selected, not the group's path.
    If you have no mask highlighted, Photoshop assumes it should select the first path it comes in contact with.

  • Question on Select query

    Hi,
    I need to prepare a select query which can fetch the below mentioned scenario:
    Ztable has fields zident, date, time, status. (zident, date, time are key fields)
    zident      date        time               status      
    10001    02/09/09    111111                s
    10001    02/08/09    222222                p
    10001    02/07/09     333333               s        from this set only one ident should come which              
    10001    02/01/09     333333               s        has latest status
    10001    02/02/09     333333               s
    10001    02/03/09     333333               s
    10002    02/09/09    111111                s
    10002    02/08/09    222222                p
    10002    02/07/09     333333               s      from this set only one ident should come which              
    10002    02/01/09     333333               s      has latest status
    10002    02/02/09     333333               s
    10002    02/03/09     333333               s
                  and so on.............
    from one set of ident one record should come in this way so many set of idents will be there.
    My question is how to form the select query

    Hello Chandra,
    Your solution lies in the concept of Control-Break Statements.
    AT NEW..
    AT END OF
    AT LAST, etc.
    DATA:
      BEGIN OF fs_table,
        zident TYPE char20,
        date   TYPE sy-datum,
        time  TYPE sy-uzeit,
        status TYPE C,
      END OF fs_table.
    DATA:
            t_table LIKE
    STANDARD TABLE
                  of   fs_table.
    " Populate the data in Internal Table.
    " While displaying data.
    LOOP AT t_table INTO fs_table.
      AT NEW status.
         WRITE:/ fs_table-status.
      ENDAT.
         WRITE:/ fs_table-zident,
                      fs_table-date,
                      fs_table-time.
      ENDLOOP.
    You can also use ON CHANGE OF fs_table-status, instead of AT NEW, if you get ***//* for date and time.
    With this, status will be displayed once and remaining will following under it.
    If you want everything to be displayed on change of each new field, apply that to every field,
    eg:
    AT NEW zident.
       WRITE:/ fs_table-zident.
      ENDAT.
    AT NEW date.
       WRITE: fs_table-date.
    ENDAT.
    .. so on and so forth.
    This is just a test-case, try using the control break statements.
    Hope it helps you.
    Thanks: Zahack

  • Some question about the query designer

    hello, dear all,
    I am a new comer of here, and I am intersting in BI, but I have no basic knowledge about it.
    so I just want someone could give me some advice about it.
    our boss need I do the developer about the query designer,  I just have searched in this forum. but nothing founded for I am a new comer here,
    I heard there are some training document of the query designer, could someone give me the URL, thanks.

    Hi,
    Query desinger is used to develop a Query, Query can be created on following data targets
    -Info Cube
    -DSO
    Virtual data target
    -MultiCube
    -Infoset
    -Multiprovider
    We have 5 section in query designer
    - Infoprovider : where we select the data target , on which report to be created
    -Filter : to restrict value at infoprovider level ( if you want data for year 2008, for example)
    -Free Characterstic : this allow you to drill down
    -Columns : char/keyfigs to be display in columns can be added here
    Row: key/char to be display in Rows can be added here
    gv me ur mailid i will let u have Bex manual,
    I would suggest , if you have any IDES ( training ) system , where you can log in and then go to RRMX,
    and try to create new query and add any data target ( which is already created ) and then drag and drop the char/key fig to the required section ,
    save it and execute it .....
    if you play arround and see the output , that would help u to understand how to work with query designer.
    Hope this helps
    Sukhi
    Edited by: Sukhvidner Singh on Nov 4, 2009 5:36 PM

  • Question about CAF Query.

    Hi.
    1、AnyOne can tell me if I can use sql in CAF?
    2、If I can use advance Sql in CAF such as 'select count(*) from tab'?
    3、if QueryFilter  has method like this 'select * from table where col in('a','b')'?
    Thanks
    f
    Edited by: hao fan on Jul 15, 2008 5:52 PM

    Hi,
    You can  use only Queryfilter to from select queries.
    Using findBy() methodes you can form the select query given in third point.
    As per my knowledge, there is no direct way to from the query
    'select count(*) from tab'.

  • Question about the Query Optimizer

    For an Excercise during my database lecture the following table
    CREATE TABLE TASKS
        "ID" NUMBER NOT NULL ENABLE,
        "START_DATE" DATE,
        "END_DATE" DATE,
        "DESCRIPTION" VARCHAR2(50 BYTE)
    ) ;with about 1.5 Million Entries were given. In addition there was the following Query:
    SELECT START_DATE, COUNT(START_DATE) FROM TASKS
    GROUP BY START_DATE
    ORDER BY START_DATE;And the Index:
    create index blub on Tasks (start_date asc);The main excercise was to speed up queries with indexes. Because all data is accessed the optimizer ignores the index and just did a full table scan.
    Here the QEP:
    | Id  | Operation          | Name  | Rows  | Bytes | Cost (%CPU)| Time     |                                                                                                                                                                                                                                
    |   0 | SELECT STATEMENT   |       |  9343 | 74744 |  3423   (6)| 00:00:42 |                                                                                                                                                                                                                                
    |   1 |  SORT GROUP BY     |       |  9343 | 74744 |  3423   (6)| 00:00:42 |                                                                                                                                                                                                                                
    |   2 |   TABLE ACCESS FULL| TASKS |  1981K|    15M|  3276   (2)| 00:00:40 |                                                                                                                                                                                                                                
    ----------------------------------------------------------------------------Then we tried to force him to do the index with this query:
    ALTER SESSION SET OPTIMIZER_MODE = FIRST_ROWS_1;
    SELECT /* + INDEX (TASKS BLUB) */ START_DATE, COUNT(START_DATE) FROM TASKS
    GROUP BY START_DATE
    ORDER BY START_DATE;but again it ignored the index. The optimizer guide states clearly, that each time you access all data from a table it has to do a full scan.
    So we tricked him in doing a fast index scan with this query:
    create or replace function bla
    return date deterministic is
      ret date;
    begin
      select MIN(start_date) into ret from Tasks;
      return ret;
    end bla;
    ALTER SESSION SET OPTIMIZER_MODE = FIRST_ROWS_1;
    SELECT /* + INDEX (TASKS BLUB) */ START_DATE, COUNT(START_DATE) FROM TASKS
    where start_date >= bla
    GROUP BY START_DATE
    ORDER BY START_DATE; now we got the following QEP:
    | Id  | Operation            | Name | Rows  | Bytes | Cost (%CPU)| Time     |                                                                                                                                                                                                                               
    |   0 | SELECT STATEMENT     |      |     1 |     8 |     3   (0)| 00:00:01 |                                                                                                                                                                                                                               
    |   1 |  SORT GROUP BY NOSORT|      |     1 |     8 |     3   (0)| 00:00:01 |                                                                                                                                                                                                                               
    |*  2 |   INDEX RANGE SCAN   | BLUB |     1 |     8 |     3   (0)| 00:00:01 |                                                                                                                                                                                                                               
    ----------------------------------------------------------------------------- So it do use the index.
    Now to my two questions:
    1. Why should it always do a full scan (because the optimizer documentation answer is a little bit unsatisfying)?
    2. After looking at the difference between the costs (FS: 3276 IR: 3) and the time the system needs (FS: 9,6 sec IR: 4,45) why does the optimizer refuse the clearly better plan?
    Thanks in advance,
    Kai Gödde
    Edited by: Kai Gödde on May 30, 2011 6:54 PM
    Edited by: Kai Gödde on May 30, 2011 6:56 PM

    John Spencer mentioned already the most important point (the role of NULL values) but here are some minor additions:
    * with the additional NOT NULL condition Oracle will do an INDEX FAST FULL SCAN (a multiblock scan of the index segment, similar to a FULL TABLE SCAN)
    * with the additional NOT NULL condition you don't need a hint and Oracle will choose the IFFS access
    * if the index was a bitmap index you would not need a NOT NULL condition because Oracle stores NULL-values in bitmap indexes (but you should not define bitmap indexes in an OLTP system because they bring massive locking issues)
    * if the index would contain a second value the additional NOT NULL condition would also be needless
    CREATE TABLE TASKS
        "ID" NUMBER NOT NULL ENABLE,
        "START_DATE" DATE,
        "END_DATE" DATE,
        "DESCRIPTION" VARCHAR2(50 BYTE)
    insert into tasks
    select rownum
         , case when mod(rownum, 5) = 0 then null else sysdate - round(rownum/100) end
         , case when mod(rownum, 4) = 0 then null else sysdate - round(rownum/50) end
         , lpad('*', 50 , '*')
      from dual
    connect by level <= 1500000;
    exec dbms_stats.gather_table_stats(user, 'TASKS')
    -- the IFFS access without a hint:
    create index blub on Tasks (start_date);
    SELECT START_DATE
         , COUNT(START_DATE)
      FROM TASKS
    WHERE START_DATE IS NOT NULL
    GROUP BY START_DATE
    ORDER BY START_DATE;
    | Id  | Operation             | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT      |      | 15001 |   102K|  1871  (16)| 00:00:10 |
    |   1 |  SORT GROUP BY        |      | 15001 |   102K|  1871  (16)| 00:00:10 |
    |*  2 |   INDEX FAST FULL SCAN| BLUB |  1200K|  8203K|  1631   (3)| 00:00:09 |
    Statistiken
              0  recursive calls
              0  db block gets
           3198  consistent gets
              0  physical reads
              0  redo size
         378627  bytes sent via SQL*Net to client
          11520  bytes received via SQL*Net from client
           1002  SQL*Net roundtrips to/from client
              1  sorts (memory)
              0  sorts (disk)
          15001  rows processed
    -- the bitmap index
    create bitmap index blub on tasks(START_DATE);
    SELECT START_DATE
         , COUNT(START_DATE)
      FROM TASKS
    GROUP BY START_DATE
    ORDER BY START_DATE
    | Id  | Operation                    | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |      | 15001 |   102K|   132   (1)| 00:00:01 |
    |   1 |  SORT GROUP BY NOSORT        |      | 15001 |   102K|   132   (1)| 00:00:01 |
    |   2 |   BITMAP CONVERSION TO ROWIDS|      |  1500K|    10M|   132   (1)| 00:00:01 |
    |   3 |    BITMAP INDEX FULL SCAN    | BLUB |       |       |            |          |
    Statistiken
              1  recursive calls
              0  db block gets
           1126  consistent gets
              0  physical reads
              0  redo size
         378682  bytes sent via SQL*Net to client
          11520  bytes received via SQL*Net from client
           1002  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          15002  rows processed
    -- the composite index
    create index blub on tasks(START_DATE, 0);
    SELECT START_DATE
         , COUNT(START_DATE)
      FROM TASKS
    GROUP BY START_DATE
    ORDER BY START_DATE;
    | Id  | Operation             | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT      |      | 15001 |   102K|  2400  (15)| 00:00:12 |
    |   1 |  SORT GROUP BY        |      | 15001 |   102K|  2400  (15)| 00:00:12 |
    |   2 |   INDEX FAST FULL SCAN| BLUB |  1500K|    10M|  2095   (3)| 00:00:11 |
    Statistiken
              0  recursive calls
              0  db block gets
           4120  consistent gets
              0  physical reads
              0  redo size
         378682  bytes sent via SQL*Net to client
          11520  bytes received via SQL*Net from client
           1002  SQL*Net roundtrips to/from client
              1  sorts (memory)
              0  sorts (disk)
          15002  rows processedRegards
    Martin Preiss

  • Question about bad query

    Hi all ,
    I have small question related to bad query .
    what is the affecting happens to database if there is lot of bad query , i know the performance issue is there what's other things .like archive log generated database time , IO , TMP tablespace , please give me information about it's .
    thanks & regards.

    user11969912 wrote:
    I have small question related to bad query . What do you consider a bad query? A bad query can be the result of poorly written and illogical SQL. It can be due to not using bind variables. It can be due to a on-optimal execution plan generated by the CBO. It can be due to poorly designed code that uses what seems to be a "good query", badly and in the wrong way (using bulk collection when a native SQL alone suffices, or hitting the very same data multiple times, etc).
    what is the affecting happens to database if there is lot of bad query Each of these have a different impact on the database. A "bad query" can cause a snapshot-too-old error. A deadlock error. A shared pool memory allocation error. Can cause no error and simple increase I/O. Or increase CPU. Etc.
    It is a lot more complex than what you seem to think, given your question.

  • One question about Selection screen

    Hi experts,
    I am writing a report, on the selection screen, I need to input the file path and then do the file upload.
    My question is about how to check the file path I put is correct or not? If it is incorrect, I want to get a message and the cursor still in the field and don't jump to the next page.
    How can I do like that?
    Any one has any suggestion, please help me.
    Thanks in advance.
    Regards,
    Chris Gu

    Hi Chris,
        do it this way: check my code after calling gui_upload what condition i am using.
    parameters:
      p_file type rlgrap-filename.          " File name
    *           AT SELECTION-SCREEN ON VALUE-REQUEST EVENT               
    at selection-screen on value-request for p_file.
      perform get_file_name.
    *                       AT SELECTION-SCREEN EVENT                    
    at selection-screen on p_file.
      perform validate_upload_file.
    *  Form  GET_FILE_NAME                                               
    form get_file_name.
      call function 'F4_FILENAME'
       exporting
         program_name        = syst-cprog
         dynpro_number       = syst-dynnr
         field_name          = ' '
       importing
         file_name           = p_file.
    endform.                               " GET_FILE_NAME
    *  Form  VALIDATE_UPLOAD_FILE                                        
    form validate_upload_file.
      data:
        lw_file  type string.              " File Path
      lw_file = p_file.
      call function 'GUI_UPLOAD'
        exporting
          filename                    = lw_file
          filetype                    = 'ASC'
          has_field_separator         = 'X'
          dat_mode                    = 'X'
        tables
          data_tab                    = t_final_data.
      IF sy-subrc ne 0 and t_final_data is initial. " here message if file path is wrong
        Message 'File not found' type 'E'.
      ELSEIF sy-subrc eq 0 and t_final_data is initial.
        Message 'File empty' type 'E'.
      ENDIF.                              
    endform.                               " VALIDATE_UPLOAD_FILE
    With luck,
    Pritam.
    Edited by: Pritam Ghosh on May 8, 2009 8:57 AM

  • Question about Resultant Query

    Documentary Table
    Doc_No     Title     Ranking     YearReleased
    1     Hoop Dreams      A     1994
    2     The Thin Blue Line     B     2000
    3     Surprise Me      A     2004
    4     Trouble the Water      C     2008
    5     Dark Days     B     2000
    6     Paris of Burning     B     1991
    7     Man on Wire     A     2008
    Please tell What will be the resultant relation that will be produced by the following SQL SELECT statement.
    Query:
    SELECT Doc_No, Title, YearReleased
    FROM
    Documentary
    WHERE YearReleased <>‘2000’;
    Please reply

    Ghulam Yassen wrote:
    I am asking about the relation after its output.
    SELECT Doc_No, Title, YearReleased
    FROM
    Documentary
    WHERE YearReleased ‘2000’;What do you mean with relation?
    If you mean the output here you are:
    WITH documentary AS
    SELECT 1 Doc_no, 'Hoop Dreams'        Title, 'A' Ranking, 1994 YearReleased FROM DUAL UNION
    SELECT 2 Doc_no, 'The Thin Blue Line' Title, 'B' Ranking, 2000 YearReleased FROM DUAL UNION
    SELECT 3 Doc_no, 'Surprise Me'        Title, 'A' Ranking, 2004 YearReleased FROM DUAL UNION
    SELECT 4 Doc_no, 'Trouble the Water'  Title, 'C' Ranking, 2008 YearReleased FROM DUAL UNION
    SELECT 5 Doc_no, 'Dark Days'          Title, 'B' Ranking, 2000 YearReleased FROM DUAL UNION
    SELECT 6 Doc_no, 'Paris of Burning'   Title, 'B' Ranking, 1991 YearReleased FROM DUAL UNION
    SELECT 7 Doc_no, 'Man on Wire'        Title, 'A' Ranking, 2008 YearReleased FROM DUAL
    SELECT doc_no, title, yearreleased
      FROM documentary
    WHERE yearreleased {noformat}<{noformat}{noformat}>{noformat} '2000';
        DOC_NO TITLE              YEARRELEASED
             1 Hoop Dreams                1994
             3 Surprise Me                2004
             4 Trouble the Water          2008
             6 Paris of Burning           1991
             7 Man on Wire                2008
    {code}
    Regards.
    Al
    Edited by: Alberto Faenza on Jun 7, 2012 12:54 PM
    Modified to show lt and gt signs                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Question about role query

    Hi all,
    I have created a rolequery and i made it as PUBLIC.
    But when i go to fieldmapping and then selected the rolename radio button and when i tried to see the list in drop down box, i could not see my rolequery.
    Did i miss anything?
    Let me know if you do not understand the question.
    Please help me.
    Thank you.

    Hi,
    In order to be able to select the rolequery in the dropdownlist, you have to create a new role. Preferably you copy an existing role, based on another existing rolwquery and name it like your rolequery.
    When the role is created, add your role query to the role on the workflow routing page of the role. When this is done the role query will appear in the drop down list.
    Kind regards,
    Joris Verdonschot

  • Question about different query results with wildcard

    Hi, I'm working with a third party app on SQL Server 2000, and from what I can gather, programmed in C# & VisualFoxPro.
    When we search with
        Note contains 94949
    we get 571 results, when we search with
        Note contains 94949*
    we get 575 results.
    There should be at least a hundred different entries that start with "94949-1" so I expected the query with the wildcard to return something like 680 results, not an additional four rows.
    Searching with
        Note contains 94949-1*
    got 483 results
        Note contains 94949-10*
    got 0 results
    Could someone explain or point me to more documentation on the difference results we get?
    Thanks

    Hi Arnie, thanks for your response.
    My situation is more basic than what appears in your example. Unfortunately, I am working solely through this application so I do not have access to the SQL to test out what you supplied, so my question is more of a need for an explanation of the search results. I do find lots of references to LIKE, Wildcards and pattern matching, but I don't find a way to explain to the users the best and most complete way to search. They mostly need a "this will always get us the results without missing anything" search technique and then to be able to select from a smaller group. I guess I need a basic course in understanding search results: how to get different ones and what they mean.
    Using 
            Note contains 94949-'%'
    returned one more result than when using an asterisk. I don't understand this difference.
            Note contains 94949-'%1'   or
            Note contains 94949-'1%'
    brings nothing nor does not using quotes. But there are hundreds of records which have the string starting with 94949-1 and a varying number of characters after that.
    ?Does the dash read not as a character in the string but as an expression?
    When I use WITHIN 3 characters, I get too few results (eight). If I use AND, I get text unrelated to the account number I am looking for.
    Again when I tried to narrow the search by adding one digit to the string to be matched, I did not get any results, but 500 results from the more general search is too much to scan by opening individual records.
    Thanks for pondering this with me.

  • Question about WebLogic query syntax

    Hello,
    I am using WebLogic Server 6.0, which came as part of the WebGain
    Studio SE 4.5 development kit. My question regards the Web Logic query
    syntax, which I have not yet mastered.
    I am trying to create a finder method that takes a single argument
    of type "char" and finds all matching fields of the column "keyword" in
    which the argument is the first letter of keyword. That is, if I were
    only looking for fields beginning with the letter "M", I'd use:
    (like keyword 'M%')
    However, I'm looking for all fields beginning with the first letter
    defined by the first argument. Sadly, this syntax:
    (like keyword '$0%')
    doesn't seem to be working. Any suggestions on the correct syntax?
    If this is not the right forum for this question, could someone
    suggest an appropriate newsgroup?
    Thanks, Dave

    962466 wrote:
    Hi all,
    I have an issue I need help with. I have created a script for an automated partition create on a monthly basis. It creates a monthly partition containing all dates within the respective month. The script is essentially this:
    ALTER TABLE SCHEMA.TABLE
    ADD PARTITION &&1
    VALUES LESS THAN (to_number(to_char(to_date('&&2', 'DD-MON-YY'), 'YYYYMMDD')))
    TABLESPACE LARGE_DATA94 COMPRESS;
    I continually get this error message "ORA-14019: partition bound element must be one of: string, datetime or interval literal, number, or MAXVALUE"
    The variable &&2 is passing in character data for the first of the month (E.G. '01-SEP-12'). &&1 passes character data for the month in MONYY (AUG12) I can run this query:
    select
    (to_number(to_char(to_date('&&2', 'DD-MON-YY'), 'YYYYMMDD')))
    from dual;
    With the output of 20120801. I cannot understand why I am able to run this partition create statement by hardcoding 20120901 but passing it in as a variable I receive the error. Note that I am not having problems with the &&1 variable. If anyone has any ideas please let me know. Thanks!I don't understand why you are taking a string, converting it to a date, then converting the date BACK TO a string ... then trying to convert that string to a number.
    What is the data type of the partitioning key? It appears that it is a NUMBER, but actually represents a DATE. If so, that is a fundamentally flawed design.

  • Question about selection table analysis

    Dear All,
    My last post was closed by the moderator so I would like to ask a different question. Please apologize if my question is trivial.
    1. There is a selection table seltab with one fields of type I, with the following contents:
    I     GT     3     0
    I     NE     8     0
    The literature eg. ABAP Objects says that the control statement like IF or CASE can be used with logical expression IN.
    Now I am checking if the variable test fulfills the conditions defined by the selection table.
    DO 10 TIMES.
      IF test IN seltab.
        write test.
      ENDIF
      test = test + 1.
    ENDDO.
    As a result I get a full list of values.
    1 2 3 4 5 6 7 8 9 10
    2. Now, if the table contains
    I     GT     3     0
    I get
    4 5 6 7 8 10 as expected
    3. If the table seltab contains
    I     NE     3     0
    the result also seems to be ok
    1 2 4 5 6 7 8 9 10
    The final question is. Is it true that the logical expression IN cannot be used with IF for more complex data comparisions?
    Thanks,
    Grzegorz

    Well,  the contents
    I GT 3 0
    I NE 8 0
    I read as:
    the variable fulfills the condition if is greater than 3 and not equal 8
    test > 3 and
    test <> 8
    which should give the result from the example above a list
    4 5 6 7 9 10
    What is wrong with my analysis?
    Regards,
    Grzegorz

  • 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

  • Question about hirarchical query

    Hi gurus!
    I have a problem with a hirarchical query. I want to if its possible to query the informations shown in table a and table b in a hierarchical way.
    Table a
    <pre>
    e_id e_num e_name
    1 100 ABC
    2 200 DEF
    </pre>
    Table b
    <pre>
    d_id d_num d_name e_id
    1 300 ABC 1
    2 400 DEF 1
    3 500 GHI 2
    4 600 JKL 2
    </pre>
    The rows should be displayed like this:
    <pre>
    e_id e_num e_name d_id d_num d_name
    1 100 ABC
    1 300 ABC
    2 400 DEF
    2 200 DEF
    3 500 GHI
    4 600 JKL
    </pre>
    Please tell me if this is possible.
    I'm looking forward to your responses.
    yours sincerely
    Florian W.

    Another solution with model
    select  e_id1  ,  e_num1 , e_name1 ,d_id, d_num, d_name
    from (SELECT a.e_id, e_num, e_name, d_id, d_num, d_name
              FROM a, b
              WHERE a.e_id = b.e_id)
    model
    partition by (e_id, e_num, e_name)
    dimension by ( row_number()over(partition by e_id, e_num, e_name order by d_id) rn  )
    measures( e_id e_id1, e_num e_num1, e_name e_name1, d_id, d_num, d_name)
    rules
    upsert
    iterate(100)
    until (presentv(e_id1[iteration_number+2],1,0)=0)
    (e_id1[0]=cv(e_id) ,
    e_num1[0]=cv(e_num),
    e_name1[0]=cv(e_name),
    e_id1[rn>=1] =null,
    e_num1[rn>=1]=null,
    e_name1[rn>=1]=null)
    order by e_id, rn
    SQL> select  e_id1,  e_num1, e_name1,d_id, d_num, d_name
      2  from (SELECT a.e_id, e_num, e_name, d_id, d_num, d_name
      3            FROM a, b
      4            WHERE a.e_id = b.e_id)
      5  model
      6  partition by (e_id, e_num, e_name)
      7  dimension by ( row_number()over(partition by e_id, e_num, e_name order by d_id) rn  )
      8  measures( e_id e_id1, e_num e_num1, e_name e_name1, d_id, d_num, d_name)
      9  rules
    10  upsert
    11  iterate(100)
    12  until (presentv(e_id1[iteration_number+2],1,0)=0)
    13  (e_id1[0]=cv(e_id) ,
    14  e_num1[0]=cv(e_num),
    15  e_name1[0]=cv(e_name),
    16  e_id1[rn>=1] =null,
    17  e_num1[rn>=1]=null,
    18  e_name1[rn>=1]=null)
    19  order by e_id, rn
    20  /
         E_ID1     E_NUM1 E_N       D_ID      D_NUM D_N
             1        100 ABC
                                       1        300 ABC
                                       2        400 DEF
             2        200 DEF
                                       3        500 GHI
                                       4        600 JKL
    6 rows selected.
    SQL>

Maybe you are looking for