11g - job_queue_processes parameter default to 1000 (also the max value)

Hi,
I'm just playing with my first installation of 11g (11.1.0.6.0 on Windows XP) and I'm looking through the parameters, default values etc.
I've noticed that if I create a database without specifiyng a value for job_queue_processes it defaults to *1000* (also the max possible value). Is this normal? A good idea?!! Why have they set the default so high? I would think setting it this high may lead to resource problems (O/S resource problems for example) and that most sites would not need to go anywhere near this high. What does the team think...?
Regards,
Ados

Ados wrote:
Hi,
I'm just playing with my first installation of 11g (11.1.0.6.0 on Windows XP) and I'm looking through the parameters, default values etc.
I've noticed that if I create a database without specifiyng a value for job_queue_processes it defaults to *1000* (also the max possible value). Is this normal? Yes. See http://download.oracle.com/docs/cd/B28359_01/server.111/b28320/initparams102.htm#CHDGECCF

Similar Messages

  • How to retrieve the max value from a cursor in procedure

    Hi,
    In a procedure, I defined a cursor:
    cursor c_emp is select empno, ename, salary from emp where ename like 'J%';
    but in the body part, I need to retrieve the max(salary) from the cursor.
    could you please tell me how I can get the max value from the cursor in the procedure.
    Thanks,
    Paul

    Here is one sample but you should just get the max directly. Using bulk processing should be a last resort.
    DECLARE
      CURSOR c1 IS (SELECT * FROM emp where sal is not null);
      TYPE typ_tbl IS TABLE OF c1%rowtype;
      v typ_tbl;
      max_sal number;
    BEGIN
      OPEN c1;
      max_sal := -9999999999999;
      LOOP                                                 --Loop added
        FETCH c1 BULK COLLECT INTO v LIMIT 3; -- process 3 records at a time
            -- process the records
           DBMS_OUTPUT.PUT_LINE('Processing ' || v.COUNT || ' records.');
            FOR i IN v.first..v.last LOOP
                 if v(i).sal > max_sal then
                   max_sal := v(i).sal;
                 end if;
                DBMS_OUTPUT.PUT_LINE(v(i).empno);
            END LOOP; 
        EXIT WHEN c1%NOTFOUND;
      END LOOP;
      DBMS_OUTPUT.PUT_LINE('Max salary was: ' || max_sal);
    END;
    Processing 3 records.
    7369
    7499
    7521
    Processing 3 records.
    7566
    7654
    7698
    Processing 3 records.
    7782
    7788
    7839
    Processing 3 records.
    7844
    7876
    7900
    Processing 2 records.
    7902
    7934
    Max salary was: 5000

  • Query to print the max value of time of the latest record from table

    hi
    i wrote this query
    which should return max fx_time of the latest or current value of fx_date
    plz help
    this wuery is giving current date fx_date but with all values not the max value of fx_time.
    select FX_DATE, FX_TIME,FROM_CURRENCY, TO_CURRENCY, ASK_RATE, BID_RATE,
    time_stamp, source,
    DESCRIPTION, FX_TYPE, OVERRIDDEN_RATE, OVERRIDDEN_BY, OVERRIDDEN_DATE ,
    ASK_RATE_INVERSE, BID_RATE_INVERSE, PX_LAST, PX_MID, PX_OPEN, PX_HIGH,
    PX_LOW,NY_TIME_OF_LAST_PRICE_UPDATE,
    DATE_OF_LAST_UPDATE, PX_BID_AM, PX_ASK_AM, PX_BID_PM, PX_ASK_PM, PX_CLOSE_1D,
    CHG_NET_1D,
    CHG_PCT_1D, PRICING_SOURCE, PX_BID_1M, PX_ASK_1M, PX_BID_1YR, PX_ASK_1YR,
    PX_CLOSE_MTD,
    PX_CLOSE_YTD, FXOPT_COMMODITY_CCY, FXOPT_SPOT_FXRATE, SPOT_RT_USD_FLAG,
    PRIOR_CLOSE_BID,
    PRIOR_CLOSE_MID, PRIOR_CLOSE_ASK from CURRENCY_EXCHANGE_TXN
    WHERE
    source='BLOOMBERG'
    AND FX_DATE=
    (select max(fx_date) JIM from CURRENCY_EXCHANGE_TXN
    ,(select max(fx_time) TIM from CURRENCY_EXCHANGE_TXN GROUP BY FX_TIME )
    what change should i do

    Hi,
    Try this:
    select FX_DATE, FX_TIME,FROM_CURRENCY, TO_CURRENCY, ASK_RATE, BID_RATE,
    time_stamp, source,
    DESCRIPTION, FX_TYPE, OVERRIDDEN_RATE, OVERRIDDEN_BY, OVERRIDDEN_DATE ,
    ASK_RATE_INVERSE, BID_RATE_INVERSE, PX_LAST, PX_MID, PX_OPEN, PX_HIGH,
    PX_LOW,NY_TIME_OF_LAST_PRICE_UPDATE,
    DATE_OF_LAST_UPDATE, PX_BID_AM, PX_ASK_AM, PX_BID_PM, PX_ASK_PM, PX_CLOSE_1D,
    CHG_NET_1D,
    CHG_PCT_1D, PRICING_SOURCE, PX_BID_1M, PX_ASK_1M, PX_BID_1YR, PX_ASK_1YR,
    PX_CLOSE_MTD,
    PX_CLOSE_YTD, FXOPT_COMMODITY_CCY, FXOPT_SPOT_FXRATE, SPOT_RT_USD_FLAG,
    PRIOR_CLOSE_BID,
    PRIOR_CLOSE_MID, PRIOR_CLOSE_ASK from CURRENCY_EXCHANGE_TXN
    WHERE
    source='BLOOMBERG'
    AND FX_DATE=
    (select max(fx_date) JIM from CURRENCY_EXCHANGE_TXN
    FX_TIME )
    [PRE]
    Please always use [ PRE ]  and [ / PRE ] tags when ever posting any code.
    Regards                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Finding the max value using partition by

    Hi
    I've the following requirement where i need to select the max value from the data
    WITH T AS
    (SELECT 48003 ID ,'SPR' RTNG_TP_CD , 'INS' RL_CD ,'A-' RAT_CD FROM DUAL UNION ALL
    SELECT 48003 , 'SLNG' ,'INS','A-' FROM DUAL)
    SELECT distinct  ID, RTNG_TP_CD,RL_CD,MAX(RAT_CD)  over (partition by id) RT_CD
    FROM T
    For a single id if there are 2 RTNG_TP_CD then select the max(rat_cd) by displayin rtng_tp_cd =SLNG
    Expected Output
    48003 , SLNG , INS , A-Thank You

    WITH T AS
    (SELECT 48003 ID ,'SPR' RTNG_TP_CD , 'INS' RL_CD ,'A-' RAT_CD FROM DUAL UNION ALL
    SELECT 48003 , 'SLNG' ,'INS','A-' FROM DUAL)
    SELECT distinct ID,decode((select count(*) from t where id=t.id),1,RTNG_TP_CD, 'SLNG') RTNG_TP_CD,RL_CD,MAX(RAT_CD) over (partition by id) RT_CD
    FROM T

  • Finding the max value

    Hi team,
    I have the following query where i need to find the max value
    [code]
      with t as  (
       select 'L1' R_nm ,'Data' R_Data , 'Obj' R_Obj , 'Wd' r_prec , '2' val  from dual
       union all
       select 'L1' , 'Data', 'Obj' , 'No', '4' from dual
    union all
       select 'L2' , 'Data', 'Obj' , 'No', '4' from dual )
       select t.*, max(val) over(partition by r_nm,r_data,r_obj)  rk from t
    [/code]
      My expected output should be
    [code]
    r_nm    r_data     r_obj   r_prec   val     rk
    L1        Data         Obj     Wd       2       1
    L1        Data         Obj     No       4        2
    L2        Data         Obj     Yes      1       1
    [/code]
    Thank You

    Hi,
    It looks like you're not interested in the MAX at all.  It looks like you want to rank the rows, such that the one with the lowest value is assigned the number 1, the row with the 2nd lowest values gets 2, ..., and the row with the N-th lowest value gets N.  If doesn't matter if the MAX is 4, or 2, or 420.
    Here's one way to do that:
    SELECT    t.*
    ,         RANK () OVER ( PARTITION BY  r_nm, r_obj
                             ORDER BY      val
                           )  AS rk
    FROM      t
    ORDER BY  r_nm, r_obj
    ,         val
    Depending on how you want to deal with ties, you might want to use ROW_NUMBER or DENSE_RANK instead of RANK.

  • 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

  • The max value for a key in an ODS

    hi,
    i want to link 2 ODS (Historic PRICE and PRICE)
    the key fields in Historic price ODS are : "material", "vendor" , and a field name "AVN"
    I want to create a start routine in order to find the data with the maximum value for the field "AVN" among data with the same key "material, vendor"
    Once this value found, i want to send it in the ODS : "PRIX"
    But how can i do it ?
    should i sort the ODS table ? what is the Abap fonction ?
    Than you very much for your help.
    Jacques

    Hi,
    seems that you need an extraction via self defined function-module.
    Within the FM, you can determine the max value like this:
    DATA: itab_ods_hist type standard table of /BIC/A<ODS HISTORIC PRICE>00 with header line.
    SELECT * FROM /BIC/A<ODS HISTORIC PRICE>00 INTO CORRESPONDING FIELDS OF TABLE itab_ods_hist
    SORT itab_ods_hist descending by material vendor AVN.
    DELETE ADJACENT DUPLICATES FORM itab_ods_hist COMPARING material vendor.
    This will give you only the max values within the itab.
    now hand this over.
    Example for a function module for extraction can be found in the R/3 source system.
    hth
    cheers
    sven

  • SSRS report with tabular model – Create a dropdown report parameter with "None" option as the top value.

    Hello Everyone,
    I would like to create SSRS single select dropdown list parameter (it is using MDX query in dataset) with "None" option at the top. Note: this parameter is dependent parameter and getting filtered based on the selection of another parameter.
    How can I add hard-coded "None" text at the top of the parameter values? Can Union function help me to add this hard-coded value? The purpose is, when user selects None from the dropdown ignore the condition of the parameter from MDX query else
    use the selected value in query condition.
    Thanks, Ankit Shah
    Inkey Solutions, India.
    Microsoft Certified Business Management Solutions Professionals
    http://www.inkeysolutions.com/MicrosoftDynamicsCRM.html

    Hi Ankit,
    In your scenario, you can achieve your requirement in report level other than in query. Add a Filter like:
    Expression: =IIF(Parameters!Name.Value="None",1,Fields!Name.Value)
    Operator:=
    Value: =IIF(Parameters!Name.Value="None",1,Parameters!Name.Value)
    In this case, report will ignore this parameter, and show all the records on the report when selecting “None” value. I have tested it on my local environment, the screenshots below are for you reference.
    Reference:
    Add a Filter to a Dataset (Report Builder and SSRS)
    Regards,
    Charlie Liao
    TechNet Community Support

  • How to get the max value of a set of percentage values?

    Hi,
    I've tried to get the max and min value of a set of calculated percentage values. Such as
    Jan Feb March Apr May Jun    Min  Average   Max
    0,5 0,8  1,1      0,4 1      0,6     0,4   0,7         1,1
    The average value works fine. But with "min" and "max" I have a problem.
    I've tried to get the value with the following ways:
    - Create a new calc. keyfigure and make a sum of all values: (Jan + Feb + ...) and set the calculation in key figure properties to Min/Max.
    - Create a new calc. keyfigure and make a sum of all values and set the aggregation to Min/Max
    - Create a selected keyfigure with a filter to the necessary periods and set a calculation to Min (Aggregation is not possible here)
    - Create a new cal. keyfigure with all periods and the function Min. e.g. min(Jan, (min Feb, (min (....)
    None of this solutions provides the right min and max value. When I use an amount value (e.g. Euro) instead of these percentage values the keyfigure with the min and max function works. The others all provide wrong values.
    Is there a solution to get the right min and max value???
    It would be a great help when you have any hints.
    Thanks
    Claudia

    Hi Aduri,
    thanks for your answer but your solution doesn't work.
    The problem is that the periods are defined in a structure with offsets such as
    - period-11
    - period-10
    - period
    in this structure elements there is also the keyfigure "netvalue" defined.
    In the rows of the report there is another characteristic such as company code.
    Is there a solution to find the max and min values of the period values for each company code? Or must I change the data model e.g. copy the keyfigure and make a new keyfigure with another aggregation level?
    Thanks for any hints!
    Claudia

  • How do I find the max value of scrollV in AS3?

    I used Ned's answer to get my 3 text fields scrolling together based on the value of one of them. Thanks Ned!
    The other two text fields scroll to match the 'parent' text field, but at the end - as you reach the last scroll position - the other two do not update and the 3 text fields are out of alignment. Its just at the end of the scroll. The rest of the scroll values align. I'm thinking if I can find the max scrollV value, I can force the other two to scroll one last time when that value is reached by the 'parent' text field.

    Thanks Rob! I knew it must be something available somewhere. That should allow me to do the needed calculations. Awesome.

  • How to get the max value in the query??

    Plant  calday(mm.dd.yyyy)       Soldout.Qty
    0001   01.01.2005               10
    0001   01.02.2005               20
    0001   01.03.2005               05
    0001   01.04.2005               16
    0001   01.05.2005               10
    0001   01.06.2005               14
        From the above values , how can i findout Max(Soldout.Qty)(i.e 20) for the above week...Suppose present aggregation = summation...How can i findout the value in the Query??don't want to do changes to design...

    Hi Bhanu,
      I tried the calculation results as...Maximum,..
      But that will pick the maximum value among the avialable values..like
    plant1 max 10
    plant2 max 20
    plant3 max 30
    then it will show as..
    plant1 max 30
    plant2 max 30
    ...like this...but my case is
    plant1 calday1 10
    plant1 calday2 05
    plan1  calday7 08
    plant2 calday1 10
    plant2 calday2 05
    plan2  calday7 20
    so for each set it need to bring the maximum value...

  • Update one table with the max value of another table

    CREATE TABLE [dbo].[General](
    [a_id] int NOT NULL,
    [a_date] datetime NOT NULL,
    [c_date] datetime NULL)
    CREATE TABLE [dbo].[Specific](
    [a_id] int NOT NULL,
    [a_date] datetime NOT NULL,
    [b_id] int NOT NULL,
    [d_date] datetime NULL)
    insert into General values (111,'Jan 1 2013', null)
    insert into General values (112,'Jan 1 2013', 'Mar 10 2014')
    insert into General values (113,'Jan 1 2013', null)
    insert into General values (114,'Feb 1 2013', null)
    insert into General values (115,'Feb 1 2013', 'Apr 1 2013')
    insert into General values (116,'Feb 1 2013', 'Jan 1 1970')
    insert into Specific values (111,'Jan 1 2013',1, 'Jan 1 2013')
    insert into Specific values (111,'Jan 1 2013',2, 'Feb 1 2013')
    insert into Specific values (111,'Jan 1 2013',3, 'Mar 1 2013')
    insert into Specific values (112,'Jan 1 2013',1, 'Jan 1 2013')
    insert into Specific values (112,'Jan 1 2013',2, 'Feb 1 2013')
    insert into Specific values (113,'Jan 1 2013',1, 'Jan 1 1970')
    insert into Specific values (114,'Feb 1 2013',1, null)
    insert into Specific values (115,'Feb 1 2013',1, 'Jan 15 2013')
    insert into Specific values (115,'Feb 1 2013',2, 'Feb 15 2013')
    insert into Specific values (116,'Feb 1 2013',1, 'Jan 30 2013')
    insert into Specific values (116,'Feb 1 2013',2, 'Jan 1 1970')
    I want to update General.c_date only when the values are null or Jan 1 1970 from the maximum value of Specific.d_date as long as the maximum is not null or Jan 1 1970.    The two tables join on a_id and a_date.  In the example  above 
    a_id = 111 and a_date = Jan 1 2013 should have c_date = Mar 1 2013 and a_id = 116 and a_date = Feb 1 2013 should have c_date = Jan 30 2013.
    lg

    Try the below:
    CREATE TABLE [dbo].[General](
    [a_id] int NOT NULL,
    [a_date] datetime NOT NULL,
    [c_date] datetime NULL)
    CREATE TABLE [dbo].[Specific](
    [a_id] int NOT NULL,
    [a_date] datetime NOT NULL,
    [b_id] int NOT NULL,
    [d_date] datetime NULL)
    insert into General values (111,'Jan 1 2013', null)
    insert into General values (112,'Jan 1 2013', 'Mar 10 2014')
    insert into General values (113,'Jan 1 2013', null)
    insert into General values (114,'Feb 1 2013', null)
    insert into General values (115,'Feb 1 2013', 'Apr 1 2013')
    insert into General values (116,'Feb 1 2013', 'Jan 1 1970')
    insert into Specific values (111,'Jan 1 2013',1, 'Jan 1 2013')
    insert into Specific values (111,'Jan 1 2013',2, 'Feb 1 2013')
    insert into Specific values (111,'Jan 1 2013',3, 'Mar 1 2013')
    insert into Specific values (112,'Jan 1 2013',1, 'Jan 1 2013')
    insert into Specific values (112,'Jan 1 2013',2, 'Feb 1 2013')
    insert into Specific values (113,'Jan 1 2013',1, 'Jan 1 1970')
    insert into Specific values (114,'Feb 1 2013',1, null)
    insert into Specific values (115,'Feb 1 2013',1, 'Jan 15 2013')
    insert into Specific values (115,'Feb 1 2013',2, 'Feb 15 2013')
    insert into Specific values (116,'Feb 1 2013',1, 'Jan 30 2013')
    insert into Specific values (116,'Feb 1 2013',2, 'Jan 1 1970')
    update A
    Set c_date = (Select MAX(d_date) From Specific B where A.a_id = B.a_id Group by a_id
    having MAX(d_date) is not null
    and MAX(d_date)<>'1970-01-01 00:00:00.000')
    From General A
    Select * From General
    Drop table general,specific
    This would cause all records in General table to get updated which is not what asker want
    see below statement
    I want to update General.c_date only when the values are null or Jan 1 1970
    from the maximum value of Specific.d_date as long as the maximum is not null or Jan 1 1970
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Get a value based on the max value

    Hi all,
    would u be so kind and show me the way to get something (without having select from the main select) from the data listed below? For simplicity i've typed the result i'd like to get
    data i have:
    day starttime id test_value
    '25.5.2007','10:00', 'A', 3
    '25.5.2007','10:15', 'A', 2
    '25.5.2007','10:35', 'A', 4
    '25.5.2007','10:45', 'A', 1
    simply get the line where is the max( test_value ) for a whole day:
    ID test_value STARTTIME
    'A', 4, '10:35'
    thanks

    SQL> create table mytable
      2  as
      3  select date '2007-05-25' day, '10:00' starttime, 'A' id, 3 test_value from dual union all
      4  select date '2007-05-25', '10:15', 'A', 2 from dual union all
      5  select date '2007-05-25', '10:35', 'A', 4 from dual union all
      6  select date '2007-05-25', '10:45', 'A', 1 from dual
      7  /
    Tabel is aangemaakt.
    SQL> var P_DATE varchar2(10)
    SQL> exec :P_DATE := '2007-05-25'
    PL/SQL-procedure is geslaagd.
    SQL> select day
      2       , max(starttime) keep (dense_rank last order by test_value) starttime
      3       , max(id) keep (dense_rank last order by test_value) id
      4       , max(test_value) test_value
      5    from mytable
      6   where day = to_date(:P_DATE,'yyyy-mm-dd')
      7   group by day
      8  /
    DAY                 START I TEST_VALUE
    25-05-2007 00:00:00 10:35 A          4
    1 rij is geselecteerd.And you should really think about combining the columns day and starttime into one column. A date contains a time component as well.
    Regards,
    Rob.
    Message was edited by:
    Rob van Wijk
    Misread the question, so posted a new solution.

  • How to bring the max value add 1 in creation mode

    Dear sir:
    I have ADF form and when I press on create Button I want on one of the field to bring the maximum number +1, I don't want to use DBSequance because the user should decide if he want the default number or enter new one, also I need if the user enter number already exist the system shows him warning message and make him to write new one.
    I use Jdeveloper10g , and adf business component and I used Action in the Create button With this method
    public String whenCreatPress() {
    //to mahe disable,enabel and rendering for the buttons and the fields
    Map session = FacesContext.getCurrentInstance().getExternalContext().getSessionMap();
    if (session.get("Render1")==null){
    session.put("Render1",true);
    session.put("Render2",false);
    session.put("Butt1",false);
    session.put("Butt2",false);
    session.put("Butt3",false);
    session.put("Butt4",true);
    session.put("Butt5",true);
    session.put("Butt6",true);
    session.put("Butt7",true);
    session.put("displayB",false);
    session.put("displayB1",true);
    session.put("displayB2",true);
    //I have to write the code for Max()+1 hear
    }else{
    session.put("Render1",false);
    session.put("Render2",true);
    session.put("Butt1",true);
    session.put("Butt2",true);
    session.put("Butt3",false);
    session.put("Butt4",false);
    session.put("Butt5",false);
    session.put("Butt6",false);
    session.put("Butt7",false);
    session.put("displayB",true);
    session.put("displayB1",false);
    session.put("displayB2",true);
    //I have to write the code for Max()+1 hear
    return null;
    }

    John,
    What would you recommend then in the following scenario? I need to find a way to insert records into a child table that has a FK relationship with its parent table and a sequence number that increments for each additional record associated with the parent.
    For instance, I have a claim with mulitple lines
    <PRE>
    Claim Id Line sequence Description
    1 1 this is for claim 1 line 1 information
    1 2 this is for claim 1 line 2 information
    1 3 this is for claim 1 line 3 information
    2 1 this is for claim 2 line 1 information
    2 2 this is for claim 2 line 2 information
    </PRE>
    I cannot use a sequence here because seqence has to be reset for each new claimid.
    Any ideas?
    I am using Jdev 11.1.1.1.0 and oracle database and using bc4j
    Thanks,

  • This is really a SQL question. How to get a record for the max value

    I have a table ZTX with the following fields and values
    VBELN  POSNR SEQNR DESCRIPTION
    3001             10   001  Desc1
    3001             10   002  Desc2
    3001             10   003  Desc3
    I want to create a query so that I can join tables VBAK-VBELN, and VBAP and ZTX. So that I only get the row of ZTX which has max (SEQNR) i.e 003 in this case. How can I write the SQL statement. Is there a way to write a single SQL statement which can retrieve from all three table VBAK, VBAP and ZTX maybe with a subquery or do I really have to first take the results of VBAK and VBAP join into internal table then fire query on ZTX.
    Thanks for reading

    Something like this
    Select * into table my_table from ztx as z
    join vbak as b on b~vbeln = z~vbeln
    join vbap as p on p~vbeln = z~vbeln " maybe posnr also?
    where
    z~seqnr = ( select max( seqnr ) from ztx where vbeln = z~vbeln ).

Maybe you are looking for

  • Macbook Pro 13 inch stuck while turning ON and heat up

    Hi, My MBP 13 inch (Snow Leaopard 10.6.8) is stuck at start upp with grey apple logo (no spinning gear). I think this problem started after I tried to turn ON my MBP with an external dongle connected to USB port (I didnt notice it is connected). Whil

  • Newbie trying to get a flash ad swf to loop

    Hello, I am a designer trying my hand at flash animated ads for the first time and can't do what is probably the simplest function imaginable. There is a tile ad on ingoodfaithwyoming.com toward the bottom of every page. It's a simple ad but I cannot

  • Set amount of TV overscan - possible?

    I've got a Mini DVI -> s-video adaptor that I use to hook my macbook up to my old CRT TV to play videos. It works a treat, bar one thing: With overscan turned off, the picture is cut off a fair way inside the TV, but with overscan turned on it cuts o

  • Collaboration Rooms and Document Uploads from Network

    Hi, We are starting to use Collaboration Rooms and would like the Documents iview to point to our network file system, so when a user uploads a file he can do it via the portal or our network drive. We are using FSR's elsewhere and are wondering how

  • Still Having Problems With Applets!!!!

    First i'd like to thank all who responded to my last post regarding a downloadable copy of the J2SE API Documentation. I have downloaded it and am quite content. I am still, however having a problem with my applets (all applets at that). Like i said