SQL Help for a computation

Hi
I am trying to create a Stock Market Technical Indicator named - Commodity Channel Index (CCI)
Date  High_Price     Low_Price     Close_Price     True_Price     TPMA     MD
02-Jan-07     2297     2238     2273     2269               
03-Jan-07     2320     2273     2311     2301               
04-Jan-07     2325     2275     2285     2295               
05-Jan-07     2305     2256     2275     2279               
08-Jan-07     2280     2193     2206     2226     2274     21     
09-Jan-07     2235     2173     2190     2200     2260     38     
10-Jan-07     2200     2153     2164     2173     2234     42     
11-Jan-07     2215     2095     2183     2164     2208     35     
12-Jan-07     2232     2200     2223     2218     2196     22     
15-Jan-07     2248     2230     2243     2240     2199     24     
16-Jan-07     2250     2216     2222     2229     2205     29     
17-Jan-07     2245     2197     2205     2216     2214     20     
Where Date, HighPrice,LowPrice,CLosePrice is the input from a table
Below is the computation of other columns
True_Price = (HighPrice+LowPrice+Closeprice)/3
TPMA = 5 Days Average True_Price (last 5 values of True_Price includeing the current) [Note:First 4 values will be 0/Null ]
MD = ABS(TPMA[5]-True_Price[5]) + ABS(TPMA[5]-True_Price[4]) + ABS(TPMA[5]-True_Price[3])+ ABS(TPMA[5]-True_Price[2])+ ABS(TPMA[5]-True_Price[1]) [Note:First 4 values will be 0/Null ]
Please note this 5 days average is a parameter so it can be 5 days , 10 day, 20 day etc so the calculation will based on this parameter+
For Example if parameter is 10 days then
TPMA = 10 Days Average of True_Price(last 10 values of True_Price includeing the current) [Note:First 9 values will be 0/Null ]
MD = ABS(TPMA[10]-True_Price[10]) ABS(TPMA[10]-True_Price[9]) ABS(TPMA[10]-True_Price[8]) ABS(TPMA[10]-True_Price[7]) ABS(TPMA[10]-True_Price[6]) ABS(TPMA[10]-True_Price[5]) ABS(TPMA[10]-True_Price[4]) + ABS(TPMA[10]-True_Price[3])+ ABS(TPMA[10]-True_Price[2])+ ABS(TPMA[10]-True_Price[1]) [Note:First 9 values will be 0/Null ]
I am really struck with computation of column MD and not sure how to make it generic to work for any value
Thanks in advance for your help
Regards
Rakesh

Hi
I am trying to create a Stock Market Technical Indicator named - Commodity Channel Index (CCI)
Date  High_Price     Low_Price     Close_Price     True_Price     TPMA     MD
02-Jan-07     2297     2238     2273     2269               
03-Jan-07     2320     2273     2311     2301               
04-Jan-07     2325     2275     2285     2295               
05-Jan-07     2305     2256     2275     2279               
08-Jan-07     2280     2193     2206     2226     2274     21     
09-Jan-07     2235     2173     2190     2200     2260     38     
10-Jan-07     2200     2153     2164     2173     2234     42     
11-Jan-07     2215     2095     2183     2164     2208     35     
12-Jan-07     2232     2200     2223     2218     2196     22     
15-Jan-07     2248     2230     2243     2240     2199     24     
16-Jan-07     2250     2216     2222     2229     2205     29     
17-Jan-07     2245     2197     2205     2216     2214     20     
Where Date, HighPrice,LowPrice,CLosePrice is the input from a table
Below is the computation of other columns
True_Price = (HighPrice+LowPrice+Closeprice)/3
TPMA = 5 Days Average True_Price (last 5 values of True_Price includeing the current) [Note:First 4 values will be 0/Null ]
MD = ABS(TPMA[5]-True_Price[5]) + ABS(TPMA[5]-True_Price[4]) + ABS(TPMA[5]-True_Price[3])+ ABS(TPMA[5]-True_Price[2])+ ABS(TPMA[5]-True_Price[1]) [Note:First 4 values will be 0/Null ]
Please note this 5 days average is a parameter so it can be 5 days , 10 day, 20 day etc so the calculation will based on this parameter+
For Example if parameter is 10 days then
TPMA = 10 Days Average of True_Price(last 10 values of True_Price includeing the current) [Note:First 9 values will be 0/Null ]
MD = ABS(TPMA[10]-True_Price[10]) ABS(TPMA[10]-True_Price[9]) ABS(TPMA[10]-True_Price[8]) ABS(TPMA[10]-True_Price[7]) ABS(TPMA[10]-True_Price[6]) ABS(TPMA[10]-True_Price[5]) ABS(TPMA[10]-True_Price[4]) + ABS(TPMA[10]-True_Price[3])+ ABS(TPMA[10]-True_Price[2])+ ABS(TPMA[10]-True_Price[1]) [Note:First 9 values will be 0/Null ]
I am really struck with computation of column MD and not sure how to make it generic to work for any value
Thanks in advance for your help
Regards
Rakesh

Similar Messages

  • SQL Help for System Analysis

    Hi all,
    Can we seek for help in SQL?
    I have an system analysis which calculate the concurrent usage of a computer system.
    I have add all data which is stored in .CSV file and then insert into a table named as Activity.
    Can we select the data from activity and generate an Excel file which report the calculation on the concurrent usage of a computer system?

    fionanycheng wrote:
    Hi all,
    Can we seek for help in SQL?
    I have an system analysis which calculate the concurrent usage of a computer system.
    I have add all data which is stored in .CSV file and then insert into a table named as Activity.
    Can we select the data from activity and generate an Excel file which report the calculation on the concurrent usage of a computer system?
    So, you have data in a .csv file
    Then you load that data into a relational database.
    Now you want to select that data and place it back into a file for Excel ......
    Hmm..   Makes me wonder why you bothered with the database in the middle.
    the database itself is more than capable of efficiently performing your calculations (assuming a reasonably rational table design).
    Maybe you could provide a better description of the business problem to be solved, instead of a pre-conceived (and possibly ill-conceived) technical solution to that unspecified business problem.  The we could provide better advice.

  • Complex SQL help for a

    I do not know if this is the right place for thius type of post. If it is not please advise where the right place is.
    I need help generating a report, hopefully with SQL in 8.1.7
    SQL Statement which produced the data below the query :
    SELECT CHANGE.change_number, CHANGE.route_date as DATE_TO_CCB, nodetable.description AS Approver_required, (TRIM(BOTH ',' FROM CHANGE.PRODUCT_LINES)) AS PRODUCT_LINES /*, PROPERTYTABLE.VALUE as PRODUCT_LINES */
    FROM CHANGE, signoff, workflow_process, nodetable /*, PROPERTYTABLE */
    WHERE ( (CHANGE.ID = signoff.change_id)
    AND (CHANGE.process_id = signoff.process_id)
    AND ((nodetable.id = signoff.user_assigned) or (nodetable.id=signoff.user_signed))
    AND (CHANGE.process_id = workflow_process.ID)
    AND (CHANGE.ID = workflow_process.change_id)
    AND (CHANGE.workflow_id = workflow_process.workflow_id)
    AND (SIGNOFF.SIGNOFF_STATUS=0 )/* in (0, 2, 3)) */ /* 0=request needs attention, 2=request approved, 3=request rejected */
    AND (SIGNOFF.REQUIRED=5 or SIGNOFF.REQUIRED=1) /* 1=Approver 5= Ad Hoc Approver */
    AND (CHANGE.IN_REVIEW=1)
    AND (CHANGE.RELEASE_DATE IS NULL)
    AND (CHANGE.CLASS != '4928')
    /* AND (PROPERTYTABLE.PROPERTYID IN (SELECT TRIM(BOTH ',' FROM CHANGE.PRODUCT_LINES) FROM CHANGE)) */
    order by change.route_date desc
    **** Results **********
    CHANGE_NUMBER|DATE_TO_CCB|APPROVER_REQUIRED|PRODUCT_LINES
    C02190|11/14/2008 3:34:02 PM|Anurag Upadhyay|270354,270362|
    C02190|11/14/2008 3:34:02 PM|Dennis McGuire|270354,270362|
    C02190|11/14/2008 3:34:02 PM|Hamid Khazaei|270354,270362|
    C02190|11/14/2008 3:34:02 PM|Mandy York|270354,270362|
    C02193|11/14/2008 3:05:18 PM|Hamid Khazaei|274279,266339,266340,266341|
    C02193|11/14/2008 3:05:18 PM|Rob Brogle|274279,266339,266340,266341|
    C02193|11/14/2008 3:05:18 PM|Xavier Otazo|274279,266339,266340,266341|
    C02193|11/14/2008 3:05:18 PM|san|274279,266339,266340,266341|
    C02194|11/14/2008 2:51:34 PM|Diana Young|271503|
    C02194|11/14/2008 2:51:34 PM|Carl Krentz|271503|
    C02194|11/14/2008 2:51:34 PM|Dennis Yen|271503|
    C02194|11/14/2008 2:51:34 PM|Gordon Ries|271503|
    C02194|11/14/2008 2:51:34 PM|Sunil Khatana|271503|
    M00532|11/13/2008 1:34:42 PM|Dennis Yen|270356,270354,270360,274279,266339,266340,266341,276780,260784|
    M00532|11/13/2008 1:34:42 PM|Jin Hong|270356,270354,270360,274279,266339,266340,266341,276780,260784|
    M00532|11/13/2008 1:34:42 PM|Sunil Khatana|270356,270354,270360,274279,266339,266340,266341,276780,260784|
    Each value in the numeric comma delimited string has a corresponding ID for the actual test string value in another table as shown below.
    PROPERTYID|VALUE
    260775|product 1
    260776|Product 2
    260777|Product x
    260778|Product y
    260779|Internal
    260780|ORCA
    260781|Tiger
    260782|Orange product
    260783|Restricted
    260784|Product zz
    266259|Product YYY
    266260|Hercules
    266261|Tangerine
    *****Desired output****
    CHANGE_NUMBER|DATE_TO_CCB|APPROVER_REQUIRED|PRODUCT_LINES
    C02190|Nov/14/2008 03:34:02 PM|Anurag Upadhyay, Dennis McGuire, Hamid Khazaei, Mandy York|Product Y,Product 1
    C02193|Nov/14/2008 03:05:18 PM|Hamid Khazaei, Rob Brogle, Xavier Otazo, san|Hercules,Apple,Product 3,Product zz
    C02194|Nov/14/2008 02:51:34 PM|Diana Young, Carl Krentz, Dennis Yen, Gordon Ries, Sunil Khatana|Product 2
    M00532|Nov/13/2008 01:34:42 PM|Dennis Yen, Jin Hong, Sunil Khatana|Product 1,Product 4,product yy,product YYY,ORCA,Tiger,Orange product,Restricted

    Hi,
    Here's how you can do it in Oracle 8.1.
    To get the individual sub-strings from product_lines, join your current result set to this "counter table"
    (   SELECT  ROWNUM  AS n
        FROM    all_objects
        WHERE   ROWNUM <= 10 -- upper bound on number of items
    )  cntrIf you don't know the worst case of how many items might be in product_lines, it's a little more complicated:
    (   SELECT  ROWNUM  AS n
        FROM    all_objects
        WHERE   ROWNUM <= 1 +
                SELECT  MAX ( LENGTH (product_lines)
                            - LENGTH (REPLACE (product_lines, ','))
                FROM    table_name
    )  cntrJoin this to the existing result set like this
    WHERE   ...
    AND     INSTR ( product_lines || ','    -- one extra comma added
                  , 1
                  , n
                  ) > 0When you do the join, you will have
    one copy of all the rows with one item in producgt_lines,
    two copies of all the rows with two items in producgt_lines,
    three copies of all the rows with three items in producgt_lines,
    and so on.
    When a row has been copied, each copy will have a different value of cntr.n.
    To extract the n-th substring from product_lines:
    SELECT  ...
            SUBSTR ( product_lines
                   , INSTR ( ',' || product_lines,   ',',   1,   n)
                   , ( INSTR (product_lines || ',',   ',',   1,   n)
                     - INSTR (',' || product_lines,   ',',   1,   n)
                   )  AS product_lines_itemWhen you have derived this column, you can join to the table with the translations
    WHERE  TO_NUMBER (product_lines_item) = propertyidTo combine these rows into one row with a comma-delimited list, GROUP BY all the columns you want to select except the property_value ('produc 1', 'tangerine', etv.), and SELECT:
    LTRIM ( MAX (CASE WHEN n =  1 THEN ',' || property_value END) ||
            MAX (CASE WHEN n =  2 THEN ',' || property_value END) ||
            MAX (CASE WHEN n = 10 THEN ',' || property_value END)
          )I don't know a good way to re-combine the rows in Oracle 8 without assuming some limit on the number of items. I assumed there would never be more than 10 in the example above. You can say 20 or 100, I suppose, if you want to. If you guess too high, everything will still work: the query will just be slower.
    This is a just one example of why packing several values into a single column is a bad idea.

  • SQL Help for Date Range display

    Gurus,
    I have a sql statement like
    select MIN(HIREDATE), MAX(HIREDATE) FROM EMP WHERE DEPTNO = 30My output looks like
    MIN(HIREDATE)     MAX(HIREDATE)
    12/30/1998        12/30/2001Based on the values of MIN(HIREDATE) , MAX(HIREDATE) values
    I need a SQL to generate the output like
    12/30/1998
    1/30/1999
    2/28/1999
    until Max(HIREDATE) value
    In Feb we dont have 30th day, In that case take the last day of the month.
    Thanks for great help
    C 007

    With 10g.
    Regards Salim.WITH t AS
         (SELECT min(hiredate) min_hiredate,
                 max(hiredate) max_hiredate
            FROM emp_test
            where deptno=30)
    SELECT min_hiredate dt
      FROM t
    model
    dimension by ( 1 rn)
    measures(min_hiredate,months_between(max_hiredate,min_hiredate) diff )
    (min_hiredate[for rn from 1 to diff[1] increment  1]=add_months( min_hiredate[1],cv(rn)-1))
    order by rn
    SQL> WITH t AS
      2       (SELECT min(hiredate) min_hiredate,
      3               max(hiredate) max_hiredate
      4          FROM emp_test
      5          where deptno=30)
      6  SELECT min_hiredate dt
      7    FROM t
      8  model
      9  dimension by ( 1 rn)
    10  measures(min_hiredate,months_between(max_hiredate,min_hiredate) diff )
    11  (min_hiredate[for rn from 1 to diff[1] increment  1]=add_months( min_hiredate[1],cv(rn)-1))
    12  order by rn
    13  /
    DT
    1998-12-30
    1999-01-30
    1999-02-28
    1999-03-30
    1999-04-30
    1999-05-30
    1999-06-30
    1999-07-30
    1999-08-30
    1999-09-30
    1999-10-30
    1999-11-30
    1999-12-30
    2000-01-30
    2000-02-29
    2000-03-30
    2000-04-30
    2000-05-30
    2000-06-30
    2000-07-30
    2000-08-30
    2000-09-30
    2000-10-30
    2000-11-30
    2000-12-30
    2001-01-30
    2001-02-28
    2001-03-30
    2001-04-30
    2001-05-30
    2001-06-30
    2001-07-30
    2001-08-30
    2001-09-30
    2001-10-30
    2001-11-30
    SQL> 

  • Sql help for columns to rows

    Hi all,
    Here is my requirement for reporting purpose…….
    Can you please help me? See below example.
    with t as (select 1 id, 'missing' col1,'expired' col2,'duplicate' col3,'other' col4 from dual union all
    select 2 id, 'missing' col1,'expired' col2,'duplicate' col3,'other' col4 from dual
    select * from t
    id     col1          col2          col3          col4
    1     missing     expired     duplicate     other
    2     missing     expired     duplicate     other
    Required out is
    id new_col
    1 missing
    1 expired
    1 duplicate
    1 other
    2 missing
    2 expired
    2 duplicate
    2 other
    Thanks in advance,

    Isn't fun to play around and see what happens?
    WITH t AS
      (SELECT 1 id,
        'missing' col1,
        'expired' col2,
        'duplicate' col3,
        'other' col4
      FROM dual
      UNION ALL
      SELECT 2 id,
        'missing' col1,
        'expired' col2,
        'duplicate' col3,
        'other' col4
      FROM dual
    SELECT id,
      new_col
    FROM t unpivot include nulls (new_col FOR col IN (col1, col2, col3, col4));gives
    ID                     NEW_COL  
    1                      missing  
    1                      expired  
    1                      duplicate
    1                      other    
    2                      missing  
    2                      expired  
    2                      duplicate
    2                      other    
    8 rows selectedNow this only works in 11g, so it's a great reason to get there.
    -Andy

  • SQL Help for FMS needed

    Hi
    Can somebody please tell me what's wrong with this:
    declare @result as varchar(30)
    if $[$OWTR.Filler] = 'NFE-1'
    begin
      set @result = (select t1.wareHouse from WOR1 t1 inner join OWOR t2 on t1.DocEntry=t2.DocEntry
    where t2.DocNum=$[OWTR.U_SIA_ProdAusg] and t1.VisOrder=$[$23.0.1]-1 AND t1.IssueType='M')
    end
    else
    set @result = 'NFE-1'
    select @result
    Thanks
    Franz

    That was not it.
    I found it ... sometimes it seems to help to ask for help ...
    set @temp = $[$OWTR.Filler]
    changed to
    set @temp = $[OWTR.Filler]
    Thanks anyway
    Franz

  • Some SQL Help for a Complete Beginner

    ...........

    Use ROLLUP then
    SQL> select id,
      2         case when grouping(id)=1 and grouping(pro_name)=1 then 'Total' else pro_name end pro_name
      3         sum(quantity) quantity
      4    from product
      5   group by rollup(id, pro_name)
      6  having (grouping(id)=0 and grouping(pro_name)=0)
      7      or (grouping(id)=1 and grouping(pro_name)=1)
      8  /
    ID    PRO_NAME               QUANTITY
    11011 Socket Type 3                20
    11110 Wrench Type 2                44
    11111 Bolt Type 1                  40
    22022 Hammer                       30
    22220 Wrench Type 3                44
    22222 Bolt Type 2                  40
    33330 Wrench Type 4                44
    33333 Bolt Type 3                  40
    44440 Nut Type 1                   80
    44444 Bolt Type 4                  40
    55550 Nut Type 2                   80
    55555 Nail Type 1                 400
    66660 Nut Type 3                   80
    66666 Nail Type 2                 400
    77770 Nut Type 4                   80
    77777 Nail Type 3                 400
    88880 Socket Type 1                20
    88888 Nail Type 4                 400
    99990 Socket Type 2                20
    99999 Wrench Type 1                44
          Total                      2346
    21 rows selected.Your price field is CHAR data type. You cant use it with quantity field which is a NUMBER data type.
    The basic structure of your table is wrong you need to modify it.
    Edited by: Karthick_Arp on May 8, 2009 11:47 PM

  • Help for a computer/phone illiterate

    I purchased a (i4) new phone today. I previously had the 3G. Well, I have tried to back-up/sync the phone numerous times and it won't transfer all my calendar information or my notes?? Called tech support 4 seperate times, after the calls were dropped. The phone drops calls, cuts out, doesn't alert when I have a text (while talking on the phone??? and it isn't muted???) and has been a general pain in the A$$ and I have only had it since 3 pm today (10-27-10). Could someone PLEASE tell me how to fix this. Did I just get a lemon phone and need to return it and try again????????

    Hello,
    First off did you restore the content from your 3G to the iPhone 4? that could cause setting issues if the restore didn’t write correctly. You’re having problems syncing your calendar and notes what program are you syncing to? Outlook (if so version), iCal address book? did you setup sync options in the info tab of itunes? especially if you downloaded a newer itunes version sometimes these options are overlooked.

  • My WiFi name and password has changed. Did someone hack my WiFi? My computer can connect but not my iPhone 5s, and the connection for my computer is full, please help.

    Hello, this is my first post.
    Well lately I've been experiencing some connection issues with my iPhone 5s. I was on my iPhone just watching Youtube when my iPhone 5s disconnected, I tried to connect again by going to settings> Wi-FI> and then select my network as usual, but the weird thing is that my Wi-Fi network has changed it's name to Wireless, it used to be Wireless710. Also the password has been changed.
    My computer can easily connect due to the fact that it is hardwired to the Wireless Cable Modem Gateway.
    Extra Info:
    Carrier is Sprint.
    I am using Windows 7 Ultimate.
    My Wireless Cable Modem Gateway is Netgear.
    And now I am confused because when I open the small tab with the computer and a plug on the bottom right corner next to the speaker icon it says I'm not connected :/?! Here is a picture of it:
    Note that I can not connect to it but am connected on my computer. It just disappeared on my phone and computer, I even unplugged my router waited for 20 seconds and connected it back in. Did it wok? for my computer yes again because it is hardwired, but my phone? No. Wireless 710 still won't show up. Is this a possible hack? Please help me as much as you all can, thank you very much.

    Log in to the router's console with a web browser from your computer. What kind of encryption did you have on the router? If it was WEP that's about as secure as no encryption. It should be WPA or WPA2. There has been an exploit reported in Netgear and Linksys routers that allows someone connected to the router if Remote Access to the console is enabled to take it over and install spyware on it.
    Is it your router, or the cable providers? If it is yours it has been hacked. If it belongs to the cable provider they may have changed it to make it more secure. Call them.
    And if it has been hacked and is yours the best thing to do is to throw it away and get a new, more secure router. Or you can try reflashing the firmware by going to Netgear's site and downloading a clean copy.

  • I have tiger 10.4.11.  In order for my computer to recognize my new Iphone I need to install the new iTunes, however the new iTunes will not download on my computer because it is not 10.5 or higher.  Is there a way that I can upgrade to leopard?  Help!!

    I have tiger 10.4.11.  In order for my computer to recognize my new Iphone I need to install the new iTunes, however the new iTunes will not download on my computer because it is not 10.5 or higher.  Is there a way that I can upgrade from tiger to leopard?  Help!!

    Mac OS X 10.5 Leopard installation system requirements
    http://support.apple.com/kb/TA24950
    Leopard is no longer available at the Apple Store but may be available by calling Apple Phone Sales @ 1-800-MY-APPLE (1-800-692-7753).
    If you can't obtain a retail install DVD from Apple, look on eBay or Google the installer part numbers to possibly find at an on-line store. Here's what to look for:
    MB427Z/A  Leopard 10.5.1 install DVD
    MB576Z/A  Leopard 10.5.4 install DVD
    MB021Z/A  Leopard 10.5.6 install DVD (single user)
    MB022Z/A  Leopard 10.5.6 install DVD (5-user family pack)
    Installing Mac OS X 10.5 Leopard
    http://support.apple.com/kb/HT1544
    Mac OS X 10.5 Leopard Installation and Setup Guide
    http://manuals.info.apple.com/en/leopard_install-setup.pdf
    After you install the base 10.5, download & install the 10.5.8 combo update at http://support.apple.com/downloads/Mac_OS_X_10_5_8_Combo_Update
     Cheers, Tom

  • I use the airport modem for my computer and wireless devices. I can't access with my iphone. It won't take my passcode. This passcode works with some of my wireless devices but not others. Can you help me?

    I use the Airport Extreme modem for my computer and wireless devices. I can't access my iphone 4 and 4S. It does not accept my passcode. My wireless laptop and wireless tower computer does accept the password. Can you help me?

    You really have an iPhone question here.
    Start with the Troubleshooting Guide for iOS devices:
    http://support.apple.com/kb/TS1398
    Post in the correct iPhone support area if you need more assistance.
    Using iPhone

  • HT5460 I have an 3 year old mac and would like to update to osx 10.6 or later. when I look for updates, it says that it has no software updates for my computer... help.

    I have an 3 year old mac and would like to update to osx 10.6 or later. when I look for updates, it says that it has no software updates for my computer... help?

    You need to buy it on DVD.
    (96867)

  • Help out:SQL Assistant for oracle

    Any time i use the logminer utility from the SQLaps SQL Assistant for oracle to query either my redo or archive logs i get this error, but the dictionary.txt file exist in the location specified;
    Please help out with details on how to solve this error:
    ORA-01284: file C\oracle\product\10.2.0\db_1\dictionary.txt cannot be opened
    ORA-06512: at "SYS.DBMS_LOGMNR", line 58
    ORA-06512: at line 1
    kindly help out on the reason for this error and detailed steps to solve this issue

    NAIJA-EXBOY wrote:
    That is how the error appears when you use the GUI utility for the logminer to query the alert logs,
    Does anybody have ideas on how logminer utility works using this software "SQL Assistant for oracle""SQL Assistant for Oracle" doesn't seem to be a tool provided by Oracle, but a third-party tool. Therefore I suggest you contact their technical support for your inquiry.
    As a workaround, as already suggested, you might want to use the DBMS_LOGMNR package to use the LogMiner. It's not that complicated at all and just needs a couple of calls to the DBMS_LOGMNR and optionally DBMS_LOGMNR_D packages. You can check the documentation on how to use it.
    If you have Oracle Enterprise Manager you could access the LogMiner interface using the Java Console version prior to 11g.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Need help on SQL Statement for UDF

    Hi,
    as I am not so familiar with SQL statements on currently selected values, I urgently need help.
    The scenario looks as follows:
    I have defined two UDFs named Subgroup1 and Subgroup2 which represent the subgroups dependent on my article groups. So for example: When the user selects article group "pianos", he only sees the specific subgroups like "new pianos" and "used pianos" in field "Subgroup1". After he has selected one of these specific values, he sees only the specific sub-subgroups in field "Subgroup2", like "used grand pianos".
    I have defined UDTs for both UDFs. The UDT for field "Subgroup1" has a UDF called "ArticleGroup" which represents the relation to the article group codes. The UDT for field "Subgroup2" has a UDF called "Subgroup1" which represents the relation to the subgroups one level higher.
    The SQL statement for the formatted search in field "Subgroup1" looks as follows:
    SELECT T0.[Name] FROM [dbo].[@B_SUBGROUP1]  T0 WHERE T0.[U_ArticleGroup]  = (SELECT $[OITM.ItmsGrpCod])
    It works fine.
    However, I cannot find the right statement for the formatted search in field "Subgroup2".
    Unfortunately this does NOT WORK:
    SELECT T0.[Name] FROM [dbo].[@B_SUBGROUP2]  T0 WHERE T0.[U_Subgroup1]  = (SELECT $[OITM.U_Subgroup1])
    I tried a lot of others that didn't work either.
    Then I tried the following one:
    SELECT T0.[Name] FROM [dbo].[@B_SUBGROUP2]  T0 WHERE T0.[U_Subgroup1] = (SELECT T1.[Code] FROM [dbo].[@B_SUBGROUP1] T1 WHERE T1.[U_ArticleGroup] = (SELECT $[OITM.ItmsGrpCod]))
    Unfortunately that only works as long as there is only one specific subgroup1 for the selected article group.
    I would be sooooo happy if there is anyone who can tell me the correct statement for my second UDF!
    Thanks so much in advance!!!!
    Edited by: Corinna Hochheim on Jan 18, 2010 10:16 PM
    Please ignore the "http://" in the above statements - it is certainly not part of my SQL.
    Please also ignore the strikes.

    Hello Dear,
    Use the below queries to get the values:
    Item Sub Group on the basis of Item Group
    SELECT T0.[Name] FROM [dbo].[@SUBGROUP]  T0 WHERE T0.[U_GroupCod] =$[OITM.ItmsGrpCod]
    Item Sub Group 1 on the basis of item sub group
    SELECT T0.[Name] FROM [dbo].[@SUBGROUP1]  T0 WHERE T0.[U_SubGrpCod]=(SELECT T0.[Code] FROM [dbo].[@SUBGROUP]  T0 WHERE T0.[Name] =$[OITM.U_ItmsSubgrp])
    Sub group 2 on the basis of sub group 1
    SELECT T0.[Name] FROM [dbo].[@SUBGROUP2]  T0 WHERE T0.[U_SubGrpCod1]=(SELECT T0.[Code] FROM [dbo].[@SUBGROUP1]  T0 WHERE T0.[Name] =$[OITM.U_ItmsSubgrp1])
    this will help you.
    regards,
    Neetu

  • I'm looking for a computer with these specifications, can anyone help me?

    I need to know if anyone can give me the names of a few laptops that have these MINIMUM specifications:
    Intel Pentium 4 or AMD Athlon 64 Processor or any better processor
    4 GB of RAM
    Windows 7
    1280 X 800 or more with qualified hardware-accelerated OpenGL graphics card, 16 bit color, and 256MB of dedicated VRAM (not Shared Memory)
    Graphics support for Shader Model 3.0, and OpenGL 2.0, DirectX 9-capable graphics card.
    DVD-drive compatible with dual-layer DVDs, Read/Write drive
    QuickTime 7.6.2 or newer
    I'm going to an art school, and will probably be getting into some Graphic Design stuff, so if you don't know a computer that has a lot of these specific terms, could you give me perhaps a few names of good laptops for art students to buy?

    Hello Balkoth,
    I work for Intel and aside from this being my job, I'm going to tell you to consider investing in a stronger processor. If you are going to be getting into Graphic Design, you will need more processing power. For your needs, I would suggest looking into the new Intel® Core™ i7 processor.
    This is our top-of-the-line processor, ahead of the curve and will continue to perform as technologies continue to emerge. Not only will you have graphics support for Shader Model 3.0, and OpenGL 2.0, DirectX 9-capable graphics cards, but the i7 has Turbo Boost Technology (Speeds up your processor when you computer needs more performance) and  Hyper-Threading Technology (multitasking that allows your computer to work on two tasks at the same time). Even if you don't need all of these features now, you never know what you will need down the line. My general rule of thumb is to never buy something that is already behind the curve.
    I would also recommend you looking into our other smart processors, i3 and i5, but I believe the i7 will be the best for your processing needs. Here is a couple computers I found with i7 processors and Windows 7 that you were looking for. Hope this helps!
    Intel- Sponsors of Tomorrow 
    Dell Studio Laptop with Intel® Core™ i7 Processor - Black Chainlink
    Model: S1747-3209CBK | SKU: 9718895
    Watch your favorite movies in high-definition or create customized CDs and DVDs with this laptop's DVD±RW/CD-RW drive with Blu-ray Disc support. The built-in 2.0MP webcam and 17.3" high-definition plus display are handy for video chatting with friends and family. Windows 7 Home Premium preloaded Which Windows 7 edition is best for you? Compare.Learn more about Intel® processors. Information provided by Intel.
     4.7 Read reviews (65)
    Sale: $949.99
    Toshiba Satellite Laptop / Intel® Core™ i7 Processor / 16" Display - Slate
    Model: A665-S6070 | SKU: 9992966
    This laptop features an Intel® Core™ i7 processor, 4GB memory and a 640GB hard drive for fast computing and ample file storage. The 16" widescreen TFT-LCD display and NVIDIA GeForce graphics provide a crisp, clear picture.Windows 7 Home Premium preloaded Which Windows 7 edition is best for you? Compare.Learn more about Intel® processors. Information provided by Intel. Take a product tour.
     1 Read reviews (1)
    Sale: $899.99
    Apple® MacBook® Pro / Intel® Core™ i5 Processor / 15.4" Display - Aluminum
    Model: MC372LL/A | SKU: 9911539
    Video chat with friends and family using this laptop's iSight webcam with omnidirectional microphone and 15.4" widescreen display. Enjoy high-speed wireless access via the built-in AirPort Extreme wireless network connection.
     5 Read reviews (5)
    Sale: $1999.99
    I am an Intel employee and state that my opinions are my own personal opinions and are not made on behalf, or to represent, Intel.

Maybe you are looking for