Picking the right values from tables - SQL (select statement)

Hi everyone,
I'm facing the litlle(?) problem in Oracle environment.
Let me explain:
I have two tables.
TABLE 1
Id1 | Val1 | Id2 | Val2
A | 44 | B | 36
B | 36 | A | 44
TABLE 2
Id | Name
A | New York
B | Seattle
I need to get from those tables, using SQL statement, result like this:
Id1 | Val1 | Name1 | Id2 | Val2 | Name2
A | 44 | New York | B | 36 | Seattle
NOTE !! Very important!! If in table 1 we have crossed the same values in fields IdX and ValX in two rows (like in example)- just one of them should be presented as a result.
I'm afraid it's a bit too complex. You, guys are my last hope.
Looking forward for any solutions.
Thanks in advance!

jeneesh wrote:
This can give you a startJaneesh, the OP specified that the duplication was across the ID and the VAL columns, but your solution only checks the ID's..
SQL> ed
Wrote file afiedt.buf
  1  with t1 as (select 'A' as id1, 44 as val1, 'A' as id2, 36 as val2 from dual union all
  2              select 'A', 36, 'A', 36 from dual)
  3      ,t2 as (select 'A' as id, 'New York' as name from dual union all
  4              select 'B', 'Seattle' from dual)
  5  -- END OF TEST DATA
  6  select distinct greatest(id1,id2) id1,
  7         case when id1 > id2 then val1 else val2 end val1,a.name name1,
  8         least(id1,id2) id2,
  9         case when id1 < id2 then val1 else val2 end val2,b.name name2
10  from t1 t,t2 a,t2 b
11  where greatest(id1,id2) = a.id
12* and least(id1,id2) = b.id
SQL> /
I       VAL1 NAME1    I       VAL2 NAME2
A         36 New York A         36 New York
SQL>With this data I would have expected both rows to be returned as there is a difference in the val columns..
SQL> ed
Wrote file afiedt.buf
  1  with t1 as (select 'A' as id1, 44 as val1, 'A' as id2, 36 as val2 from dual union all
  2              select 'A', 36, 'A', 36 from dual)
  3      ,t2 as (select 'A' as id, 'New York' as name from dual union all
  4              select 'B', 'Seattle' from dual)
  5  -- END OF TEST DATA
  6      ,t3 as (select distinct id1, val1, id2, val2
  7              from
  8                (
  9                 select decode(switch,1,id2,id1) as id1
10                       ,decode(switch,1,val2,val1) as val1
11                       ,decode(switch,1,id1,id2) as id2
12                       ,decode(switch,1,val1,val2) as val2
13                 from (select id1, val1, id2, val2
14                             ,case when id1||val1 > id2||val2 then 1 else 0 end as switch
15                       from t1)
16                )
17             )
18  --
19  select t3.id1, t3.val1, t2_1.name
20        ,t3.id2, t3.val2, t2_2.name
21  from   t3 join t2 t2_1 on (t2_1.id = t3.id1)
22*           join t2 t2_2 on (t2_2.id = t3.id2)
SQL> /
I       VAL1 NAME     I       VAL2 NAME
A         36 New York A         36 New York
A         36 New York A         44 New York

Similar Messages

  • How to exit from SQL*Plus based on the return value of a SQL select stment?

    Hi
    I have a SQL script executed from SQL*Plus. I would like to know if SQL*Plus
    supports any kind of branching or exiting from script execution based on a
    returned value of a SQL select statement. I am on 9i.
    Regards,
    Tamas Szecsy

    in sqlplus, you have whenever
    ex:
    whenever sqlerror exit failure
    insert into ...
    -- if this fails, then you will be out
    insert into ...
    -- if this fails, then you will be out
    whenever sqlerror continue
    insert into ...
    -- if this fails, this continues
    insert into ...and you have PL/SQL
    declare x number;
    begin
    select count(*) into x from emp;
    if (x=14) then null; end if;
    end;
    /note that you can mix those in some case
    -- exit if there is no row in emp
    whenever sqlerror exit 1
    var dummy number
    exec select count(*) into :dummy from emp having count(*)!=0

  • Using substring to pick the numeric value from a string failing

    Hi,
    I have a string like fffd_1234.com from this I need to pick the numeric value from which is in between the _ and . , for that I have wriiten the expression as
    Reverse(SUBSTRING( REVERSE( "fgfg_asdd.com" ),
    FINDSTRING(Reverse( "fgfg_asdd.com" ), ".", 1 )+1 ,findstring(
    Reverse( "fgfg_asdd.com" ),"_",1 )-FINDSTRING(Reverse("fgfg_asdd.com"
    ), ".", 1 )-1))
    This is throwing me the error or its giving me with the result with _123.

    Why all the "reverse" calls?  Do you expect underscores or periods to occur more than once in the file name?
    This should work:
    SUBSTRING("fffd_1234.com", FINDSTRING("fffd_1234.com", "_", 1) + 1, FINDSTRING("fffd_1234.com", ".", 1) - FINDSTRING("fffd_1234.com", "_", 1) - 1)
    Talk to me now on

  • Function module to find out the changed values from tables

    What is the standard function module to find out the changed values (the old & new values) from tables in SAP ?

    Hi Harish,
    Please elaborate your requirement...
    Please have a look on CDHDR AND CDPOS tables... it contains changed data... but all chages are not being tracked using it..
    Try Below FMs as well..
    For Header Level...
    CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
        EXPORTING
          date_of_change    = cdhdr-udate
          objectclass       = cdhdr-objectclas
          objectid          = cdhdr-objectid
          time_of_change    = cdhdr-utime
          username          = cdhdr-username
        TABLES
          i_cdhdr           = icdhdr
        EXCEPTIONS
          no_position_found = 1
          OTHERS            = 2.
    For Item Level
    CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
          EXPORTING
            changenumber      = icdhdr-changenr
          IMPORTING
            header            = cdhdr
          TABLES
            editpos           = icdshw
          EXCEPTIONS
            no_position_found = 1
            OTHERS            = 2.
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7
    ilesh Nandaniya

  • Comparing and picking the right value form one of the line item in a doc.

    Hi Gurus,
    I have requirement such that I have to show the tax jurisdiction code of only one item. That is if there are 5 line items with in a document and each one has diffeerent tax jurisdiction code, then we should be showing only one tax jurisdiction code for a document. Line items are not displayed in report. The condition to pick up tax jurisdiction code is the one which has least ending zeros.
    Supppose
    Doc1          Item          Tax Jurisdiction code
    1800000002       1          CNQC00000000000
    1800000002       2          CNQC00000000000
    1800000002       3          CN0000000000000
    1800000002       4          CNQC00000000000
    1800000002       5          TXJOHNCLEBUR000
    I have to display  the value of tax jurisdiction code corresponding to item 5  as its has least  zeros in it.
    So what I am trying to do is add another custom z object tax jurisdiction code and the value for this is populated using a routine in the update rules, such that comparing all the tax jurisdiction code for all the corresponding items in a document.
    Now the question is if I am reading all values of document no. line item and tax jurisdiction code into an internal table form communication structure for a data package. And in the update rule I will be writing a routine comparing the values of tax jurisdiction code from internal table and populating the desired value. Now the big question for me is if there are two line items of a document in one data package and another 3 line items of the corresponding same document in data package 2 then how can we compare the values of Tax jurisdiction code of all the 5 line items of a document.
    If this can be achieved using customer exit on the front end let me know and just inputs how the abap code would be or if not do I have to write abap in updates rules. I just want to know how to compare different values of Tax Jurisdiction code and select the one with has least ending zeros. For information the tax jurisdiction code is of type character and length 15.
    Any help is really appreciated.
    Thanks,
    Raj

    Yes, it's possible. Just use a regular text item. Create an LOV using the LOV wizard. When you define the query for the LOV's record group, enter a statement that selects from the other database table. Set the return value of the appropriate LOV column to be the text item on the form. Finally, assign the LOV to that text item, so that the LOV pops up when the user presses the LOV key with the cursor in that text item. You can also set the LOV so that it automatically displays when the cursor enters the text item.
    Just look up LOV in online help if you need more info.

  • How to capture all the rows returned from a sql select query in CPO

    Hi,
      I am executing an sql select query which returns multiple rows. I need to capture the values of each row to specific variables. How do I proceed.
    Thanks,
    Swati

    The select activities  ("Select from Oracle," Select from SQL Server," etc.) against database already return tables.  Use one of the database adapters to do your select, and it will already be in a table form.  Just put your query in the select and identify the columns in your result table. The online help or the database adapter guides in the product documentation can help.

  • Dynamically get the Max value from table and insert max value + 1 in Target

    Hi All, I have a requirement given below, need help in building a solution for this: A mapping that will get the dynamically get the max value(Basically a number) from table , this target table is used by many other concurrent jobs and updated very frequently. My requirement is to get max value from this target table dynamically (Using dynamic look up) and then have an expression to increment by 1 and then load it to Target.I tried using SELCT max(col1) from target in dynamic look up override but this does not seem to work.Any work around here? I dont insist on using a SQL transformation here as Production DB could have 3 Million + records! Thanks in advance, -KRB

    Q/微信859034112办理科廷/ECU/MU/西澳大学毕业证成绩单及真实使馆教育部认证/永久可查Q/微信859034112办理USYD/UNSW/MQ/UTS/Monash/悉尼大学毕业证成绩单及真实教育部认证专业面向澳洲留学生提供以下服务: 一:毕业证、成绩单等全套材料,从防伪到印刷,从水印到钢印烫金,水印底纹。二:真实使馆认证(留学人员回国证明),使馆存档可通过当地使馆查询三:真实教育部认证,教育部永久存档,教育部留服网站永久可查 四:真实留信认证,留信网入库存档,永久可查  现在教育部认证办理已经不需要提供回国证明(使馆认证),如无需要,请注意办理流程!联系人:kevin  QQ: 859034112     微信:859034112如果您是以下情况,我们都能竭诚为您解决实际问题:1、在校期间,因各种原因未能顺利毕业,拿不到官方毕业证; 2、面对父母的压力,希望尽快拿到; 3、不清楚流程以及材料该如何准备; 4、回国时间很长,忘记办理; 5、回国马上就要找工作,办给用人单位看; 6、企事业单位必须要求办理的; 请联系英华教育客服kevin,专业负责为您排忧解难!资深业务!联系人:kevin    QQ: 859034112      微信:859034112 澳洲各大高校均可办理,样板齐全。 悉尼大学 TheUniversity of Sydney  新南威尔士大学TheUniversity of New South Wales  墨尔本大学 The University ofMelbourne  阿德莱德大学 Adelaide University   莫纳什大学 Monash University   昆士兰大学The University of Queensland    西澳大学 The University of WesternAustralia  澳大利亚国立大学 The Australian National University   麦考瑞大学 Macquarie University   纽卡斯尔大学 TheUniversity of Newcastle 卧龙岗大学 University of Wollongong  格里菲斯大学 Griffith University   佛林德斯大学 Flinders University  塔斯马尼亚大学 University of Tasmania  西悉尼大学Universityof Western Sydney   邦德大学Bond University    迪肯大学 Deakin University  悉尼科技大学 University of Technology ,Sydney    科汀科技大学 Curtin University of Technology  墨尔本皇家理工学院 RMIT University  昆士兰科技大学QueenslandUniversity of Technology    拉筹伯大学 La Trobe University  莫道克大学 Murdoch University  堪培拉大学 University of Canberra 旋宾科技大学 Swinburne University of Technology南澳大学Universityof South Australia  中央昆士兰大学 University of Southern Queensland   查尔斯特大学  Charles SturtUniversity  詹姆斯库克大学 James Cook University       圣母大学 Notre Dame  新英格兰大学 The University of NewEngland     南昆士兰大学  Universityof Southern Queensland  澳洲天主教大学 Australia CatholicUniversity巴里迪大学Universityof Ballarat  埃迪斯科文大学 Edith Cowan University  南十字星大学 Southern Cross University  阳光海岸大学 University of Sunshine Coast  维多利亚大学VictoriaUniversity   北领地大学 NorthernTerritory University诚招代理:本公司诚聘当地代理人员,如果你有业余时间,有兴趣就请联系我们。敬告:面对网上有些不良个人中介,真实教育部认证故意虚假报价,毕业证、成绩单却报价很高,挖坑骗留学学生做和原版差异很大的毕业证和成绩单,却不做认证,欺骗广大留学生,请多留心!办理时请电话联系,或者视频看下对方的办公环境,办理实力,选择实体公司,以防被骗!  办理悉尼大学USYD毕业证Q/微信859034112成绩单学历认证 University of Sydney 办理新南威尔士大学UNSW毕业证Q/微信859034112成绩单学历认证 University of New South Wales 办理墨尔本大学Melbourne毕业证Q/微信859034112成绩单学历认证 University of Melbourne 办理昆士兰大学Queensland毕业证Q/微信859034112成绩单学历认证 University of Queensland 办理麦考瑞大学MQU毕业证Q/微信859034112成绩单学历认证 Macquarie University 办理莫纳什大学Monash毕业证Q/微信859034112成绩单学历认证 Monash University 办理澳洲国立大学ANU毕业证Q/微信859034112成绩单学历认证 Australian National University 办理澳洲天主教大学ACU毕业证Q/微信859034112成绩单学历认证 Australian Catholic University 办理悉尼科技大学UTS毕业证Q/微信859034112成绩单学历认证 University of Technology Sydney 办理查尔斯特大学CSU毕业证Q/微信859034112成绩单学历认证 Charles Sturt University 办理格里菲斯大学Griffith毕业证Q/微信859034112成绩单学历认证 Griffith University 办理科廷大学Curtin毕业证Q/微信859034112成绩单学历认证 Curtin University 办理西悉尼大学UWS毕业证Q/微信859034112成绩单学历认证University of Western Sydney 办理澳洲纽卡斯尔大学Newcastle毕业证Q/微信859034112成绩单学历认证 University of Newcastle 办理昆士兰科技大学QUT毕业证Q/微信859034112成绩单学历认证 Queensland University of Technology 办理皇家墨尔本理工学院RMIT毕业证Q/微信859034112成绩单学历认证 RMIT University 办理卧龙岗大学Wollongong毕业证Q/微信859034112成绩单学历认证 University of Wollongong 办理迪肯大学Deakin毕业证Q/微信859034112成绩单学历认证 Deakin University 办理拉筹伯大学毕业证Q/微信859034112成绩单学历认证 La Trobe University 办理新英格兰大学UNE毕业证Q/微信859034112成绩单学历认证 University of New England办理阿德莱德大学Adelaide毕业证Q/微信859034112成绩单学历认证 University of Adelaide办理西澳大学毕业证Q/微信859034112成绩单学历认证 University of Western Australia办理堪培拉大学Canberra毕业证Q/微信859034112成绩单学历认证 University of Canberra办理塔斯马尼亚大学Tasmania毕业证Q/微信859034112成绩单学历认证 University of Tasmania办理澳洲维多利亚大学Victoria毕业证Q/微信859034112成绩单学历认证Victoria University办理中央昆士兰大学CQU毕业证Q/微信859034112成绩单学历认证 Central Queensland University办理邦德大学Bond毕业证Q/微信859034112成绩单学历认证 Bond University办理南昆士兰大学USQ毕业证Q/微信859034112成绩单学历认证 University of Southern Queensland办理南澳大学USA毕业证Q/微信859034112成绩单学历认证 University of South Australia办理斯威本科技大学SUT毕业证Q/微信859034112成绩单学历认证 Swinburne University of Technology办理詹姆斯.库克大学JCU毕业证Q/微信859034112成绩单学历认证 James Cook University办理澳洲圣母大学UND毕业证Q/微信859034112成绩单学历认证 University of Notre Dame办理南十字星大学SCU毕业证Q/微信859034112成绩单学历认证 Southern Cross University办理弗林德斯大学Flinders毕业证Q/微信859034112成绩单学历认证 Flinders University办理莫道克大学Murdoch毕业证Q/微信859034112成绩单学历认证 Murdoch University办理埃迪斯科文ECU大学毕业证Q/微信859034112成绩单学历认证 Edith Cowan University 办理查尔斯达尔文大学CDU毕业证Q/微信859034112成绩单学历认证 Charles Darwin University办理巴拉瑞特大学Ballarat毕业证Q/微信859034112成绩单学历认证 University of Ballarat办理阳光海岸大学USC毕业证Q/微信859034112成绩单学历认证University of Sunshine Coast

  • How to read the field value from Table Control

    Hello Experts,
    I am creating my first Table Control Screen. Basically I have to create a screen (102) with a table control which has 2 fields: A_QTY, B_QTY and 2 Buttons: SAVE, EXIT.
    When Clicked on 'SAVE' the data (MATNR) from a previous screen (101)  and the data (A_QTY, B_QTY) from the new screen (102) should be saved into a Z-table.
    Internal table t_data has 3 fields.
    MATNR
    A_QTY
    B_QTY.
    Table Control TC_RACK was declared like this:
    controls tc_rack type tableview using screen 0102.
    I/0 Fields:
    A_QTY type ZQTY.
    B_QTY type ZQTY.
    The screen Flow Logic:
    process before output.
    module status_0102.
      loop at t_data into w_data with control tc_rack.
      endloop.
    process after input.
      module exit_0102 at exit-command.
      loop at tc_rack.
      endloop.
    module user_command_0102.
    module status_0102output.
      set pf-status 'STATUS_102'.
      set titlebar 'TITLE_102'.
      describe table t_rack lines tc_rack-lines.
    endmodule.                 "status_0102 output
    process after input.
    module user_command_0615 input.
    case ok_code.
       when 'SAVE_RK'.
       when others.
    endcase.
    endmodule.                 "user_command_0102 input
    Now for eg, when the users enter values for A_QTY and B_QTY like this:
    A_QTY     B_QTY
    1000         2000
    3000         4000
    How can I read these values and pass them to T_DATA so that I can save it into Z-table?
    I greatly appreciate your help.
    I've gone through some previously posted threads and could not understand because my knowledge in this area is preliminary.
    Thanks a lot.
    Could you please let me know
    Edited by: dev a on Jan 13, 2010 2:46 PM

    Hi dev a
    You should use
      DATA: lv_name(30) TYPE c.
      FIELD-SYMBOLS: <QTY> type ZQTY.
    GET CURSOR FIELD lv_name.   "Get the field name in table control
    check sy-subrc = 0.
    assign  (lv_name) to <QTY>.  "Here you get the value in <QTY>
    check sy-subrc = 0.
    Also use <your table control>-current_line to get the table index uo're currently on.
    Hint: Do not use GET CURSOR LINE if you want to get table index since this gives you the line relative to dialog screen
    Good luck
    Dean Q.
    Edited by: Dean Q on Jan 13, 2010 11:11 PM

  • Process Order detail scheduling picking the std values from Phase.

    I'm working on an Implementation scenario, where the Master Recipe contains only one Operation and one phase. After the Process order is created the basic start and End dates remain same. I did check the formula in the resource(on testing its working fine). I did check the control key, formula parameters, scheduling parameters of the process order. I have maintained the std values in the phase appropriately.
    Still the process order basic start/end dates are same, even though the process order quantity is of any quantity.
    Request all to please provide some inputs.
    Thanks,
    Nil.

    Sorry, this is not the right forum for technical questions - please log a note in OSS or contact SAP services. Thanks

  • How imrove the peformance of VBFA table in select statements.

    Hi,
    whenever execute program in production, program execution will taking long time due to below select statement.
    Please help me how we imrove performance?
    SELECT vbelv vbeln posnn vbtyp_v
    FROM vbfa
    INTO TABLE l_i_vbfa
    FOR ALL ENTRIES IN l_i_bill_cs
    WHERE vbeln EQ l_i_bill_cs-vbeln
    AND posnn EQ '000010'
    AND vbtyp_n IN ('K', 'H'). "MOD-024--
    AND vbtyp_v IN ('K', 'H'). "MOD-024++
    SORT l_i_vbfa BY vbeln vbtyp_n.
    Regards,
    Naidu
    Moderator message: third time I have to remind you: for performance problems with VBFA table please search for previous discussions of the same topic
    Edited by: Thomas Zloch on Nov 9, 2010 12:41 PM

    Hi Naidu,
    ranges: r_vbtypv type vbfa-r_vbtyp_v.
      CLEAR r_vbtypv.
      r_vbtypv-option = 'EQ'.
      r_vbtypv-sign   = 'I'.
      r_vbtypv-low    = 'K'.
      APPEND r_vbtypv.
      CLEAR r_vbtypv.
      r_vbtypvl-option = 'EQ'.
      r_vbtypv-sign   = 'I'.
      r_vbtypv-low    = 'H'.
      APPEND r_vbtypv.
    sort l_i_bill_cs by vbenl.
    if not l_i_bill_cs[] is initial.
    SELECT vbelv vbeln posnn vbtyp_v
    FROM vbfa
    INTO TABLE l_i_vbfa
    FOR ALL ENTRIES IN l_i_bill_cs
    WHERE vbeln EQ l_i_bill_cs-vbeln
    AND posnn EQ '000010'
    AND vbtyp_v IN r_anlkl.
    endif.
    SORT l_i_vbfa BY vbeln vbtyp_n.
    Thanks,
    Nelson

  • How to get the number value from Oracle SQL Query?

    Hi All,
    I have a query which will return the below output.
    LINE_NUMBER           STRING
    10000                        A,B,C,D
    20000                       X,Y,Z,D
    80000                       P,Q,R,A
    130000                     E,R,T,Y
    210000                     Y,R,G,H
    1300000                   F,H,Y,UThe above output i need to get only the number 1, 2, 8, 13, 21, 210 for each row. Can you give the solution for that?
    Thanks

    Another wild guess
    SQL>  with t as (
    select '10000                        A,B,C,D' str from dual union all
    select '20000                       X,Y,Z,D' str from dual union all
    select '80000                       P,Q,R,A' str from dual union all
    select '130000                     E,R,T,Y' str from dual union all
    select '210000                     Y,R,G,H' str from dual union all
    select '1300000                   F,H,Y,U' str from dual
    select str, rtrim(regexp_substr(str,'\d+'),0) nums from t
    STR                                  NUMS                               
    10000                        A,B,C,D 1                                  
    20000                       X,Y,Z,D  2                                  
    80000                       P,Q,R,A  8                                  
    130000                     E,R,T,Y   13                                 
    210000                     Y,R,G,H   21                                 
    1300000                   F,H,Y,U    13                                 
    6 rows selected.

  • How to get the sum in BSEG table using select statement

    hai all
    i made the internal tale "itab1" .. i want to get the som  feild of  DMBTR in BSG table my code is here but its not working gave som error massage (Aggregate functions and the addition DISTINCT are not supported in field lists for pooled and cluster tables.)  plz tel me how should i do it..... i want to get the som of that feild....          
    loop at itab1
         SELECT sum( DMBTR  ) from bseg INTO itab1-DMBTR141_45
             where GJAHR = itab1-GJAHR
             and   BELNR = itab1-BELNR.
    endloop.
    regard
    nawa

    SELECT BELNR GJAHR SHKZG DMBTR
                 from bseg
                 INTO table it_bseg
                 for all entries in itab1
                 where GJAHR = itab1-GJAHR
                   and BELNR = itab1-BELNR.
    loop at it_bseg.
        IF it_bseg-shkzg = 'H'.
          it_bseg-dmbtr = it_bseg-dmbtr * ( -1 ).
        ELSE.
          it_bseg-dmbtr = it_bseg-dmbtr.
        ENDIF.
        MODIFY it_bseg.
    endloop.
    loop at it_bseg.
    READ TABLE itab1 with key belnr = it_bseg-belnr
                               gjahr = it_bseg-gjahr.
    if sy-subrc = 0.
    collect it_bseg into it_bseg_amount.
    endif.
    endloop.
    U can use the collect statement
    Regards
    Gopi

  • How to get the returned value from Functions with Callable statement?

    I was glad to find that stored procedures can be invoke with Java class code by the object of Callable statement like :
    String stmt = "BEGIN departments_pkg.do_select(?,?,?); END;";
    and getting the output variables by
    populateAttribute(DEPARTMENTNAME,st.getString(2),true,false);
    But i would like to get values returned from FUNCTION other than stored procedure, how can i achieve it? Thanks a lot!

    Here is  my code
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_1202.
      MODULE subscreen_find.
      CALL SUBSCREEN SUBSEARCH INCLUDING sy-cprog dynnr.
    PROCESS AFTER INPUT.
      MODULE USER_COMMAND_1202.
      CALL SUBSCREEN SUBSEARCH.
    MODULE subscreen_find.
      case sy-ucomm.
        when 'SELECTED'.             "fcode
          case 'ZSKILL_SEARCH'.     "data element
            when '01'.                       " value range
              dynnr = 0110.
            when '02'.
              dynnr = 0111.
          endcase.
      endcase.
    ENDMODULE.
    kindly tell me what is wrong
    Edited by: Raji Thomas on Feb 8, 2010 10:20 AM

  • How to populate a text field by some value from table in Oracle seeded page through Personalization?

    I have to populate Description field by default in AGIS page (Advanced Global Intercompany System).
    Field Description:
    messageTextInput: Description
    VO: FunTrxHeaderVO
    VO Attribute: Description
    VO is entity based.
    Now if the field is null then I have to populate this value by some value from table for selected batch_id.
    Example:
    (SELECT DESCRIPTION FROM fun_trx_batches WHERE batch_id =
    211061)
    Also, this value is being populated in the Batch Information region in the same page. So the problem is also be treated as to copy a value from one messageStyledText to messageTextInput in a same page.
    Can this be done through personalization, w/o coding?
    Please suggest if you any idea how to resolve..
    Regards,
    Pahari

    Not sure why it is not displying in the front page list??
    I have to search it.
    Admin team, please help.
    Regards,
    Pahari

  • Jdev9i, JSP, Execute a Sql Select statement directly?

    Hi,
    I need the syntax to execute a Sql SELECT statement directly against Oracle database and access rows(returned by SELECT statemnet) in a JSP page or Servlet? Any sample code available for this.
    Thanks.

    Hi Ali,
    I didn't work a lot with jsp ,but on this url some help .
    http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/java.817/a83726/basics7.htm#1014578

Maybe you are looking for

  • Error when calling a method inside a form routine...

    Hello experts, I am trying to call a method inside a form but it is giving me an error. The error is: Access not possible using 'NULL' object reference. Anyway, below is my code guys: START-OF-SELECTION.   DATA: main          TYPE REF TO lcl_main,   

  • Can Lookout Operate in any way with multiple monitors/video boards in one computer?

    Windows supports multie monitors in varios wasy. Can I utilize Lookout with this functionality?

  • Fromula SumGT SumCT in Query Designer

    Hi Folks, I have two formulas in the Query Designer. Formula A with exception aggregation on Material (Count) and didnot use calculate result as Field ( but it is showing some value in the result(count) ) & Formula B with calculate result as total. N

  • How to include new inserted row in cursor

    Hi ... Is there anyway to include new inserted row into opened cursor ? consider the following code: declare cursor tbl_cur is select * from table1; -- table1 has two fields: no and name -- begin for tbl_rec in tbl_cur loop -- if I insert some record

  • Installing java 2 sdk in RedHat linux7.1

    I have downloaded java2 sdk (rpm file) and installed it in RedHat linux 7.1 but I can't run javac to compile my java programs. can somebody please explain why???