Max Function doesn

i have created a procedure in a form that return summary columns (count,max) and it is based in a view which is created containing 2 select statement. the problem is the max function doesn't return the max date in the first select statment in the Form. but if i run it in sql it does. i think the trouble is because this feild is a companition of two feilds(contract_Date and sysdate) ... i will add the view and the procedure below so it would be clear. but my question is : if the sql return the right result why the form can't show it.
View ...
CREATE OR REPLACE VIEW ATN_DLEV_DCON_VIEW( EMP_ID,
REPORT,TYPE, DATE_FROM )
AS SELECT
ID,
'TO_RENEW' REPORT,
'ÊÌÏíÏ ÚÞÏ' TYPE,
CONTRACT_DATE DATE_FROM
FROM PRS_EMPLOYEE_PROFILE
WHERE TO_CHAR(ADD_MONTHS(SYSDATE,1),'MM')=TO_CHAR(EMPLOYMENT_DATE,'MM')
AND CONTRACT_TYPE = 2
AND EMP_STS_ID NOT IN (40, 28)
union
SELECT
EMP_ID,
          'PayLev01'     REPORT ,
          'ÊÑÍíá ÅÌÇÒÉ'     TYPE,
START_DATE     DATE_FROM
     FROM PRS_EMP_VAC_APPLICANTS
     WHERE REC_STATUS in (1,5) and emp_id <> 187
Procedure
PROCEDURE P_SHOW_TASKS IS
     V_COUNT          NUMBER:=0;
     V_CHK               NUMBER;
BEGIN
SELECT COUNT(EMP_ID)
     INTO V_CHK
     FROM SEC_USERS
     WHERE ID = :GLOBAL.USR;
IF V_CHK <> 0 THEN
     SELECT DES_ARB
     INTO :TASKS.DEPT_NAME
     FROM           PRS_DEPARTMENTS
     WHERE ID = 6 ;
     SELECT COUNT(DISTINCT TYPE)
          INTO V_COUNT
          FROM ATN_DLEV_DCON_VIEW1, SEC_GROUPS
          WHERE EMP_ID IN (SELECT ID FROM PRS_EMPLOYEE_PROFILE) AND ID = 'ADM';
     IF V_COUNT <> 0 THEN
          SHOW_VIEW('CV_TASKS');
          GO_BLOCK('TASKS');
          FIRST_RECORD;               
          FOR I IN (SELECT report, COUNT(EMP_ID) COUNT, TYPE, MAX(DATE_FROM) DATE_FROM FROM ATN_DLEV_DCON_VIEW1 WHERE EMP_ID IN (SELECT ID FROM PRS_EMPLOYEE_PROFILE) GROUP BY REPORT, TYPE) LOOP
               :TASKS.REPORT := I.REPORT;
               :TASKS.COUNT := I.COUNT;     
               :TASKS.TYPE := I.TYPE;
               :TASKS.MAX_DATE := I.DATE_FROM;
               V_COUNT := V_COUNT - 1;
               IF V_COUNT <> 0 THEN
                    NEXT_RECORD;
               ME(V_COUNT);
               END IF;
          END LOOP;
     END IF;
ELSE
     SELECT COUNT(DISTINCT TYPE)
          INTO V_COUNT
          FROM ATN_DLEV_DCON_VIEW1;
     IF V_COUNT <> 0 THEN
          SHOW_VIEW('CV_TASKS');
          go_block('TASKS');
          FIRST_RECORD;     
          FOR I IN (SELECT REPORT, COUNT(EMP_ID) COUNT, TYPE , MAX(DATE_FROM) DATE_FROM FROM ATN_DLEV_DCON_VIEW1 GROUP BY REPORT, TYPE) LOOP
               :TASKS.REPORT := I.REPORT;
               :TASKS.COUNT := I.COUNT;          
               :TASKS.TYPE := I.TYPE;
                    :TASKS.MAX_DATE := I.DATE_FROM;
               V_COUNT := V_COUNT - 1;
               IF V_COUNT <> 0 THEN
                    NEXT_RECORD;
               ME(V_COUNT);
               END IF;
          END LOOP;
     END IF;
END IF;
END;

thank you for your reply ...well, this is what is confusing me, it works in sql and it works in forms as well but not with the two date variables (To_RENEW, START_DATE)... if you had a look to the view, i posted the wrong one here but down below will be the one i am using. in the first select statment the date is a companition of CONTRACT_DATE
(to get the month and day of renewal date of the contract because i don't have it as a COLOUM in the table ) concatonated with sysdate to get only the year "IT IN BOLD IN THE VIEW" and in the second select statment it is availabe in the table, and it is returned correclty in sql and procedure of the form as well. so if there is something worng with procedure the other date will not be shown this is the part of the procedure that fill the form with data
(SELECT report, COUNT(EMP_ID) COUNT, TYPE, MAX(DATE_FROM) DATE_FROM FROM ATN_DLEV_DCON_VIEW1 WHERE EMP_ID IN (SELECT ID FROM PRS_EMPLOYEE_PROFILE) GROUP BY REPORT, TYPE) LOOP
:TASKS.REPORT := I.REPORT;
:TASKS.COUNT := I.COUNT;
:TASKS.TYPE := I.TYPE;
:TASKS.MAX_DATE := I.DATE_FROM;
V_COUNT := V_COUNT - 1;
IF V_COUNT <> 0 THEN
NEXT_RECORD;
this part ( MAX(DATE_FROM) works with the second select statment of the view and it doen't work for the first one in the form only but it does in sql foe both
i am waitin 4 ur eply
here is the right view
CREATE OR REPLACE VIEW ATN_DLEV_DCON_VIEW( EMP_ID,
REPORT,TYPE, DATE_FROM )
AS SELECT
ID,
'TO_RENEW' REPORT,
'ÊÌÏíÏ ÚÞÏ' TYPE,
TO_CHAR(SYS_DATE,'YYYY') || '/'|| TO_CHAR(CONTRACT_DATE,'MM','DD')DATE_FROM
FROM PRS_EMPLOYEE_PROFILE
WHERE TO_CHAR(ADD_MONTHS(SYSDATE,1),'MM')=TO_CHAR(EMPLOYMENT_DATE,'MM')
AND CONTRACT_TYPE = 2
AND EMP_STS_ID NOT IN (40, 28)
union
SELECT
EMP_ID,
'PayLev01' REPORT ,
'ÊÑÍíá ÅÌÇÒÉ' TYPE,
START_DATE DATE_FROM
FROM PRS_EMP_VAC_APPLICANTS
WHERE REC_STATUS in (1,5) and emp_id <> 187

Similar Messages

  • How to Avoid Errors in Max Function When Data Contains Blank Cells

    I have a column with duration values. However, it also contains some blank cells. These "blank cells" have formulas in them, but as the cells they reference too are blank the formula doesn't produce a result.>/p>
    I want to get the max value from this column. When I simply do =MAX(column-name) I get an error, presumably because some of the cells are blank. This table is going to be highly dynamic, so I don't want to limit the range of the MAX() function to only those cells with values.
    So does anyone know a solution for this, please? If I was some how able to create a formula which returned the range of cells with actual values, then I could use that in the MAX() function. Or, if I could somehow tell the MAX() function to ignore blank cells, but I'm not sure either of these are possible.
    Thanks,
    Nic

    I don't see a problem with "blank" (null string) cells mixed with duration cells.  MAX works fine with this mix of cells. But if the "blank" cells are numbers, not text, that gives an error.
    A formula always produces a result. A formula cannot result in a blank cell. The closest you can get to "blank" is a null string (the result of two quotes next to each other with nothing between them) . So the question is, what is the result that you are calling "blank"?

  • Using max function in PL/SQL

    VERY URGENT...
    Am new to oracle...
    I've written a package that display gif images in form of histogram/bar chart. using html,
    I need to use max function to display values proportionately.
    please help. i need to complete this assignment by 2/9/00 by 10.00 am at the latest. I've half written a function but I don't know if there's a simpler way fo doing this. html enabled

    First of all Thanks to all gentlemen who replied ..many thanks ...
    Tried the ROW_NUMBER() option but still it is taking time...have given output for the query and tkprof results as well. Even when it doesn't fetch any record ( this is a valid cased because the input header id doesn't have any workflow request submitted & hence no entry in the wf_items table)..then also see the time it has taken.
    Looked at the RANK & DENSE_RANK options which were suggested..but it is still taking time..
    Any further suggestions or ideas as to how this could be resolved..
    SELECT 'Y', 'Y', ITEM_KEY
    FROM
    ( SELECT ITEM_KEY, ROW_NUMBER() OVER(ORDER BY BEGIN_DATE DESC) RN FROM
    WF_ITEMS WHERE ITEM_TYPE = 'xxxxzzzz' AND ROOT_ACTIVITY = 'START_REQUESTS'
    AND SUBSTR(ITEM_KEY,1,INSTR(ITEM_KEY,'-') - 1) = :B1
    ) T WHERE RN <= 1
    call count cpu elapsed disk query current rows
    Parse 0 0.00 0.00 0 0 0 0
    Execute 1 0.00 1.57 0 0 0 0
    Fetch 1 8700.00 544968.73 8180 8185 0 0
    total 2 8700.00 544970.30 8180 8185 0 0
    many thanks

  • MAX Function not returning MAX

    I have a query that is pulling in EDI 214 status codes, and want to pull in the last received status for status type "AG". To do this, I'm using the MAX function on the INSERT_DATE field of the status code AG, but the query keeps returning both AG status codes. I've tried this in a single query (Query 1) but it did not work so I also attempted it in a much smaller query to be used as a subquery, but that still did not work. Can anyone identify what the issue is with what I'm attempting to do?
    Query 1 (All Inclusive):
    SELECT BS.SHIPMENT_GID AS BUY_SHIPMENT_GID,
    AGSS.EVENTDATE AS AG_EVENT,
    D1SS.EVENTDATE AS D1_EVENT,
    BS.START_TIME AS BUY_START_TIME,
    AGSS.STATUS_CODE_GID AS AG,
    D1SS.STATUS_CODE_GID AS D1,
    BS.DOMAIN_NAME AS BUY_DOMAIN,
    MAX(AGSS.INSERT_DATE) AS AG_INSERT_DATE,
    MAX(D1SS.INSERT_DATE) AS D1_INSERT_DATE,
    BS.START_TIME,
    BS.DOMAIN_NAME,
    SHIPSTAT.STATUS_VALUE_GID
    FROM V_ROD_SHIPMENT BS
    INNER JOIN V_ROD_SS_STATUS_HISTORY AGSH
    ON (BS.SHIPMENT_GID = AGSH.SHIPMENT_GID)
    INNER JOIN V_ROD_IE_SHIPMENTSTATUS AGSS
    ON (AGSH.I_TRANSACTION_NO = AGSS.I_TRANSACTION_NO)
    INNER JOIN V_ROD_SS_STATUS_HISTORY D1SH
    ON (BS.SHIPMENT_GID = D1SH.SHIPMENT_GID)
    INNER JOIN V_ROD_SHIPMENT_STATUS SHIPSTAT
    ON (BS.SHIPMENT_GID = SHIPSTAT.SHIPMENT_GID)
    INNER JOIN V_ROD_IE_SHIPMENTSTATUS D1SS
    ON D1SH.I_TRANSACTION_NO = D1SS.I_TRANSACTION_NO
    WHERE BS.START_TIME > '18/MAY/12'
    AND BS.DOMAIN_NAME = 'UPS/CP/HDMB'
    AND AGSS.STATUS_CODE_GID = 'AG'
    AND D1SS.STATUS_CODE_GID = 'D1'
    AND (SHIPSTAT.STATUS_VALUE_GID = BS.DOMAIN_NAME
    || '.SECURE RESOURCES_ACCEPTED'
    OR SHIPSTAT.STATUS_VALUE_GID = BS.DOMAIN_NAME
    || '.SECURE RESOURCES_PICKUP NOTIFICATION')
    GROUP BY BS.SHIPMENT_GID,
    AGSS.EVENTDATE,
    D1SS.EVENTDATE,
    BS.START_TIME,
    AGSS.STATUS_CODE_GID,
    D1SS.STATUS_CODE_GID,
    BS.DOMAIN_NAME,
    SHIPSTAT.STATUS_VALUE_GID
    Query 2 (to be used as a sub-query if I cannot pull MAX insert date in previous query):
    SELECT DISTINCT BS.SHIPMENT_GID AS BUY_SHIPMENT_GID,
    AGSS.EVENTDATE AS AG_EVENT,
    AGSS.STATUS_CODE_GID AS AG,
    MAX(AGSS.INSERT_DATE) AS AG_INSERT_DATE
    FROM V_ROD_SHIPMENT BS
    INNER JOIN V_ROD_SS_STATUS_HISTORY AGSH
    ON (BS.SHIPMENT_GID = AGSH.SHIPMENT_GID)
    INNER JOIN V_ROD_IE_SHIPMENTSTATUS AGSS
    ON (AGSH.I_TRANSACTION_NO = AGSS.I_TRANSACTION_NO)
    WHERE AGSS.STATUS_CODE_GID = 'AG'
    AND BS.SHIPMENT_GID = 'UPS/CP/HDMB.HDM-1000203768'
    GROUP BY BS.SHIPMENT_GID,
    AGSS.EVENTDATE,
    AGSS.STATUS_CODE_GID
    Results of query 2 (similar issue as query 1, query doesn't return MAX insert date):
    BUY_SHIPMENT_GID     AG_EVENT     AG     AG_INSERT_DATE
    UPS/CP/HDMB.HDM-1000203768     5/25/2012 6:00:00 PM     AG     5/21/2012 3:10:36 PM
    UPS/CP/HDMB.HDM-1000203768     6/1/2012 5:00:00 PM     AG     5/20/2012 2:36:18 PM
    I appreciate any help.
    Thanks,
    -Adam

    Hi, Adam,
    Welcome to the forum!
    Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    Simplify the problem as much as possible. Remove all tables and columns that play no role in this problem.
    If you can show what the problem is using commonly available tables (such as those in the scott schem) then you don't have to psot any sample data; just the results and the explanation.
    Always say which version of Oracle you're using.
    See the forum FAQ {message:id=9360002}
    MAX (insert_date) returns the latest insert_date. I think, in this problem, you don't really want the latest insert_date; you want the status code that's related to the last insert_date. One way to get that is the aggregate FIRST (or LAST) function.
    Consider this query, using the scott.emp table:
    SELECT       ename
    ,       hiredate
    FROM       scott.emp
    ORDER BY  hiredate
    ,            ename
    ;Output:
    ENAME      HIREDATE
    SMITH      17-Dec-1980
    ALLEN      20-Feb-1981
    WARD       22-Feb-1981
    JONES      02-Apr-1981
    BLAKE      01-May-1981
    CLARK      09-Jun-1981
    TURNER     08-Sep-1981
    MARTIN     28-Sep-1981
    KING       17-Nov-1981
    FORD       03-Dec-1981
    JAMES      03-Dec-1981
    MILLER     23-Jan-1982
    SCOTT      19-Apr-1987
    ADAMS      23-May-1987Say we're only interested in seeing the last hiredate, and the name of the person hired on that date:
    LAST_ENAME LAST_HIREDA
    ADAMS      23-May-1987Here's how to get those results using the aggregate LAST function:
    SELECT       MIN (ename) KEEP (DENSE_RANK LAST ORDER BY hiredate) AS last_ename
    ,       MAX (hiredate)                                              AS last_hiredate
    FROM       scott.emp
    ;What if there's a tie for the latest hiredate? For example, say we're only looking at people hired before 1982. In that case, the latest hiredate is December 3, 1981, and there happen to be two people hired on that date. This query
    SELECT       MIN (ename) KEEP (DENSE_RANK LAST ORDER BY hiredate) AS last_ename
    ,       MAX (hiredate)                                              AS last_hiredate
    FROM       scott.emp
    WHERE         hiredate     < DATE '1982-01-01'
    ;produces only 1 row of output:
    LAST_ENAME LAST_HIREDA
    FORD       03-Dec-1981Why did it show FORD rather than JAMES? Because of the MIN function. When there happens to be a tie for the latest hiredate, MIN says to return the first ename (in normal sort order) of the rows that have that hiredate.
    FIRST and LAST work with GROUP BY, too.
    In the example above, we were only looking at one column related to the latest hiredate. If we neede to see several columns, it would be simpler to use the analytic ROW_NUMBER function:
    WITH     got_r_num     AS
         SELECT  emp.*
         ,     ROW_NUMBER () OVER ( ORDER BY  hiredate  DESC
                                   ,            ename
                           ) AS r_num
         FROM    scott.emp
         WHERE     hiredate     < DATE '1982-01-01'
    SELECT     *
    FROM     got_r_num
    WHERE     r_num     = 1
    I hope this answers your question.
    If not, post a more complete explanation of what you want to do. if you have to use your own tables, then post CREATE TABLE and INSERT statements for a little sample data. Post the results you want from that data, and explain how you get those results from that data.

  • The to_date function doesn't work ?

    Hello
    I don't know why my to_date function doesn't work on my pc.
    my statement is pretty complex so i just tried simple one
    select to_date('10-Jan-2006','dd-mon-yyyy') from dual;
    but even this one doesn't work it says it is invalid month
    howcome?
    is it because my Windows XP (not english version) doesn't recognise month Jan?
    i tried it another place it worked
    so is there any language pack / patch i need to install? ?
    so does OS matters?
    or how to fix this..please help me

    By default SQL Developer picks up it's language settings up from (on Windows) the Regional and Language Options. You can see what it has set by querying the NLS_SESSION_PARAMETERS view.
    Assuming you don't want to change to using DD-MM-YYYY formats for your months or change your regional settings on your PC, you need to tell SQL Developer which language you want, which you can do by adding the following lines to the file sqldeveloper\jdev\bin\sqldeveloper.conf:
    AddVMOption -Duser.language=en
    AddVMOption -Duser.country=US

  • Cannot print with a Samsung ML2160 printer (mono laser) and Pages. Print function doesn't work, only drag and drop in printer's queue

    Hello,
    I just purchased a Samsung ML2160 printer and it doesn't work with nor my Pages program, nor the Preview (to print PDF). No matter the way I tried, the Print function doesn't work and I cannot neither print or even enter the printer preferrences menu! My MacBook Pro has worked before with other printers, but now with the Samsung it doesn't work at all... Though, if I drag and drop a document, jpg, pdf in the printer queue, it prints just fine, but that method gives me absolutely no freedom to the printing... Could it be something from the Computer -> Machintosh HD -> Library -> Printers? Because a friend of mine was recently trying to save me some disk space, and therefore erasing part of the HP printer (to remove the previous printer I owned)...
    If anyone has any idea, that would be much appreciated
    Thank you in advance

    Do the sensible thing, as you say neither Preview nor Pages print, try other programs eg TextEdit. If none of them print then it is a System problem and very likely the printer drivers are AWOL or were never installed.
    Go to Samsung's website and download their software for the Mac:
    http://www.samsung.com/uk/consumer/print-solutions/print-solutions/mono-printers /ML-2160/XEU-support
    http://www.samsung.com/uk/support/model/ML-2160/XEU-downloads
    Peter

  • Since I got my new fixed disk my scan function doesn't work (HP Photosmart Premium All-in-One-Drucker - C309g), what should I do

    since I got my new fixed disk my scan function doesn't work (HP Photosmart Premium All-in-One-Drucker - C309g), what should I do

    Check whether you have the latest driver:
    Printer and Scanner software available for download:
    http://support.apple.com/kb/HT3669?viewlocale=en_US

  • I upgraded my 3 yr old iMac to Snow Leopard and now my HP C4150 Scanning function doesn't work (not recognized).  I downloaded updated Drivers from the HP site, but still no joy.  Any suggestions?

    I upgraded my 3 yr old iMac to Snow Leopard (OS X 10.6) and now my HP C4150 Scanning function doesn't work (not recognized).  I downloaded updated Drivers from the HP site and installed them, but still no joy.  Any suggestions?

    aspaceman,
    Perhaps I owe you an apology.   Having re-read that downloading from HP was unsuccessful I feel uncomfortable.  Can I suggest you update your 10.6 system (as noted in your profile) to 10.6.8 (if it is not already there) by using the
    Mac OS X 10.6.8 Update Combo v1.1 combo update plus any software updates that then apply.  

  • My daughter has just bought me an iPad 2 from Dubai and set it all up for me but unfortunately the iMessage function doesn't seem to work. We keep getting messages,when trying to activate it, that there is a network connection problem - help!

    My daughter has just bought me an iPad 2 from Dubai and set it all up for me but unfortunately the iMessage function doesn't seem to work. We keep getting messages,when trying to activate it, that there is a network connection problem - help!

    Thank you both for your responses but my daughter was reassured by the salesman in the iStyle store (official Apple store in the UAE) that iMessages would work but conceded that FaceTime wouldn't. My iTunes account is registered in the uk and my daughter's iPhone has iMessages even though she bought it (and uses it) in Dubai. Can anyone else throw any light on this?

  • MAX function

    Hi Everyone,
    Am aware of the following flavors of MAX function
    1) choose MAX from the folders/fields list (selected items tab)
    2) create calculation using: MAX keep dense
    3) create calculation using: MAX analytic function
    questions, pls:
    ===========
    a) with MAX regular, MAX keep dense, MAX - analytic function
    is it necessary to sort it using tools/sort - choose fields to sort by?
    or does the data get sorted due to the ORDER BY clause in MAX used in a calculation
    b) how to understand the diff. bet. MAX keep dense and MAX - analytic function
    1) i understand that analytic functions are applied after detail row processing
    does MAX keep dense calculation happen during detail row processing?
    2) how did you know to advise when to use MAX keep dense, and when to use MAX - analytic function?
    tx for your ideas and assistance, sandra

    Hi,
    a) with MAX regular, MAX keep dense, MAX - analytic function is it necessary to sort it using tools/sort - choose fields to sort by? or does the data get sorted due to the ORDER BY clause in MAX used in a calculationIt is only necessary to use a sort if you want to have the rows returned in a specific order. The order by in the max calculation defines the maximum within the group or window. It may affect the order the rows are returned, but if it does this is not guaranteed and you should use a sort on the main query.
    b) how to understand the diff. bet. MAX keep dense and MAX - analytic function
    1) i understand that analytic functions are applied after detail row processing does MAX keep dense calculation happen during detail row processing?Yes
    2) how did you know to advise when to use MAX keep dense, and when to use MAX - analytic function?In general, if you want the result on a single row, so you have one row for each group then you should use the aggregate max. If you want to use the same max on all the rows in the window (defined by the partition) then use the analytic max.
    Rod West

  • Regarding MAX() function

    Hi,
    I am having table A. I have few records in the table A. Database version : 9.2
    ID name deleted
    2 XYZ N
    3 ABD N
    4 GJK N
    5 GJK N
    6 HGY N
    7 YJG N
    8 PIN N
    9 BMF N
    10 OLG N
    I used the following query...
    SELECT MAX(ID) FROM A WHERE DELETED='N';
    It was worked fine until now....
    Now i used the same query...
    But the result is
    MAX(ID)
    9
    Please help me... What is the reason?
    I want the correct result...
    Thanks in advance....                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Kamran Agayev A. wrote:
    Yes you can use TO_NUMBER inside MAX function and it will not give any error in the futureHave you tested it?
    SQL> create table a (id,name,deleted)
      2  as
      3  select '2', 'XYZ', 'N' from dual union all
      4  select '3', 'ABD', 'N' from dual union all
      5  select '4', 'GJK', 'N' from dual union all
      6  select '5', 'GJK', 'N' from dual union all
      7  select '6', 'HGY', 'N' from dual union all
      8  select '7', 'YJG', 'N' from dual union all
      9  select '8', 'PIN', 'N' from dual union all
    10  select '9', 'BMF', 'N' from dual union all
    11  select '10', 'OLG', 'N' from dual
    12  /
    Tabel is aangemaakt.
    SQL> select max(id)
      2    from a
      3   where deleted = 'N'
      4  /
    MA
    9
    1 rij is geselecteerd.
    SQL> select max(to_number(id))
      2    from a
      3   where deleted = 'N'
      4  /
                        MAX(TO_NUMBER(ID))
                                        10
    1 rij is geselecteerd.
    SQL> insert into a values ('2A', 'ABC', 'N')
      2  /
    1 rij is aangemaakt.
    SQL> select max(to_number(id))
      2    from a
      3   where deleted = 'N'
      4  /
    select max(to_number(id))
    FOUT in regel 1:
    .ORA-01722: invalid numberRegards,
    Rob.

  • Use of MAX function

    Hi,
    I am using parent-child hierarchy and in my reports I want to show Max(hierarchy_level). When I use the function MAX directly in the report it works fine in every way. But I want to have this kind of column in the BI Server presentation catalog so the user does not need to add MAX in Analysis/Answers (this is 11g). Normally this would imply a Max(hierarchy_level) as a logical function, but in the BI Server it is not allowed with MAX function in the logical function so it does not work.
    The hierarchy level is just a column from a dimension table and creating it as a fact column is not a very good solution. I also tried to solve this in many different ways, but only the MAX funtion in Analysis/Answers allways give the correct result. Used in combination with other dimensions etc. I want the exact same behaviour as I get when using MAX in analysis.
    Any good ideas to solve this? Is there another function in the BI Server that works the same way as MAX ?

    Very often, about a primary key, see for example our italian accounting application (our VAT invoices:fatture IVA) ), where the holes might be a problem.
    Yes Rosario, of course I know that, and that's why I said "in this scenario" : if primary key is the only purpose, I don't think holes could be a problem.
    Buona giornata anche a te.

  • Lightroom 5.7.1, Yosemite OS X - Synchronise Folder function doesn't work in Lr. Is there a compatibility issue? I can see the folders/images in Finder but when trying to synchronise folders in Lr it does not recognise that there are any images and theref

    Lightroom 5.7.1, Yosemite OS X - Synchronise Folder function doesn't work in Lr.
    Is there a compatibility issue? I can see the folders/images in Finder but when trying to synchronise folders in Lr it does not recognise that there are any images and therefore unable to import to catalogue. Anyone has any idea how to make it work. Thanks a lot.

    Hi Elba,
    Thank you very much for your reply. Not sure, however, that we are talking about the same problem.
    I am trying to perform the same function in Lr that I have been doing for many years in the past and has only been a problem in the last few days (possibly coinciding with upgrading to Yosemite, trying to find out whether that is the problem)
    I am not intending to sync any files with Creative Cloud but only trying to use 'Synchronize Folder' function in Lr. Normally, I would right click on a particular folder in Lr catalogue and click on that function to check that the Lr Catalogue is perfectly matching my drives where the original photos are actually stored.
    The problem that I only started to encounter is that I can see the files on the actual drives but they do not appear in my Lr Catalogue and they are completely invisible to Lr. I simply can not get Lr to recognise them and then import them to catalogue.
    If for example, I export images to Ps and then save and close them, they do appear on my drive but are invisible to Lr and I can't get them imported into the catalogue. Import to folder also not producing any results as they are still invisible to Lr.
    Completely baffled by it. Any idea what could be the reason?
    Kind regards,
    Nik

  • Sort function doesn't work E12

    the sort function doesn't work half the time on Elements 12 organizer.

    What about FUNCTION CLOCK_INFormula
    RETURN NUMBER
    IS
        l_hours_worked  NUMBER;
        l_to_return     NUMBER;
    BEGIN
        l_hours_worked := TO_NUMBER(NVL(:ATX_CLOCK_IN,'0'));
        IF (MOD((l_hours_worked - 0.02),0.25) = 0) THEN
            l_to_return := TRUNC((l_hours_worked - 0.02) * 4) / 4;
        ELSE
            l_to_return := TRUNC((l_hours_worked + 0.23) * 4) / 4;
        END IF;
        RETURN (l_to_return);
    EXCEPTION  
        WHEN VALUE_ERROR THEN
            RAISE_APPLICATION_ERROR ( -20100
            ,   'ERROR, Cannot represent '
            ||  :ATX_CLOCK_IN
            ||  ' as a number.');
    END CLOCK_INFormula;?
    This function assumes :ATX_CLOCK_IN is always positive.
    T.

  • Tap function doesn't work, recovered files in bin etc

    Hi
    I'm using Mac Book Pro 13' - Mac OS 10.6.8
    1) Every time, I switched on my laptop, the one finger (tap to click) function doesn't work (although I have set it up).
    I have to go to 'systems preferences' to set it up again.
    2) Why is there 'Recovered files' in the trash bin each I switched on my laptop? How to get rid of it?
    3) Sometimes when I work using Word 2011, it takes a long time to save (the little icon will be swirling and swirling) and then I had to force quit and lose unsaved info. Why does this happen and how to avoid it from happening?
    Pls help me. I'm in the middle of my thesis submission and urgently need solutions to my Mac problems. Thanks!

    Reinstall Photoshop. That often fixes the issue.

Maybe you are looking for

  • Cost center valorization for free of charge item

    During sales order entry I need to have some - standard item that have to be invoiced to the customer - free of charge items; these items have not to be invoiced and for them I need to value a specific cost center ( for the standard price stored in m

  • Need help playing 2 SWFs in sequence

    I have two SWFs that I want to play in sequence, using a third SWF (that has nothing besides this code). This should be simple -- play the first, wait for its timeline to end, then play the second. Problem is I can't get the timeline to wait. To load

  • Problems compiling KontrollerLab

    Hi, I am trying to compile KontrollerLab from the AUR but I have some problems. First I got an error during execution of the configure script saying that mcopdil is missing and I should check if aRts is properly installed. I was able to bypass this w

  • Photoshop CC keep asking for Serial Number

    Photoshop CC keep asking for Serial Number. Adobe has charged my credit card 5x since June, but my Photoshop CC still doesn't work.

  • Immediate answer

    SQL> ed Wrote file afiedt.buf 1 INSERT INTO IHS_PT_CASE@link_to_dmsr 2 SELECT 'IHS_OWNER', SUBSTR(TRIM(ADT_CASE.CASE_ACCOUNT_NO),1,12), 3 ADT_CASE.CASE_ADMIT_DT, ADT_CASE.CASE_DC_DT, SUBSTR(TRIM(ADT_CASE_LOCATION.LOCN_NSG_STATN_CD),1 4 SUBSTR(TRIM(AD