Some problem using in this function!!!

Is it valid to write a function like this??
CREATE OR REPLACE FUNCTION
dept_dtls(DEPT_ID IN VARCHAR2)
RETURN record is
DEPT EMPLOYEE.DEPT_ID%TYPE;
STATUS RECORD;
BEGIN
Select COUNT(DESIGNATION),
into STATUS
from EMPLOYEE
where DEPT=DEPT_ID
GROUP BY DESIGNATION;
RETURN STATUS;
END dept_dtls;

There are many things that I don't understand here or probably Oracle even can't understand.
RETURN record
What is record? WHen yu are taking count(something), it would be a number so, status variable should hold number and so should be of number datatype. By the way, if you had used GROUP BY function, then there is every possibility that this select results in one or more number of records which fails the function with TOO_MANY_RECORDS exception.
Cheers
Sarma.

Similar Messages

  • I have iphone 4 and have never updated itsince i've bought it. now i would like to update it to iOs 7. maybe can i have some problems in doing this due to the fact that i've never updated it until now?

    I have iphone 4 and have never updated itsince i've bought it. now i would like to update it to iOs 7. maybe can i have some problems in doing this due to the fact that i've never updated it until now? thanks in advance for every reply

    Did you follow this article to update your phone?
    iOS 4: Updating your device to iOS 5 or later
    iOS: How to update your iPhone, iPad, or iPod touch
    If your device has modified software installed (jailbreak), you might get problems using the phone after updating it.

  • Use of this function module

    hi,
    can anyone explain the use of this function module,  i coudn't find any documentation .
    This function module prints the data selected in selection screen.. but i want a breif explanation y we use this and wat for is this....
    FM_SELECTION_CRITERIA_PRINT

    Hi,
    1. Suppose the requirement is to know the parameters/select-options selected on the selection screen, on the list output (report).
    Because once we are on the report output , we wouldnt know the selection parameters made. The only way is to go back & check. Instead of going back we can use this FM to know even when we are on the o/p.
    2. Also to take a print of both the report output& selection parameters.
    Reward if useful.
    Thanks
    SMS

  • Use of this functional module   HR_EMPLOYEE_ENQUEUE

    what is use of this function module HR_EMPLOYEE_ENQUEUE.
    thanks in advanced.

    before doing the changes in EMP records ,first u have to Lock the PERNR then only SAP will allow u do the changes.
    ENQUEUE is nothing but a lock.
    Regards
    Prabhu

  • Possible to block when browser says some plugin used by this page are out of date?

    Possible to block when browser says some plugin used by this page are out of date? I want to block the message.

    Hi I upgraded to latest version of Snow Leapard 10.6.8 from 10.5.6 and I was able to download latest flash. A screen told me to upgrade and it point me to the website. Ty

  • Sorry, we're having some problems bringing you thi...

    every time I try to log in to ovi.com via computer to edit some informations I see this orry, we're having some problems bringing you this page. It's our fault not yours, so please try again later. Reloading the page may help I cant add or remove device.cant edit anything.also on mobile when I try to synchronise it says system error I tried to log in to ovi.com from different computers,different browsers,different methods/3g/,/adsl/,/wifi/ but I face the same problem am having this problem for more than one month and nobody seems to care.so I would like to know if am the only one who have this problem.thank you
    my blog on the net(in arabic):http://bazkurd.wordpress.com

    No, you are not alone. I cannot sync my tasks and I have also this message:
    Sorry
    Sorry, we're having some problems bringing you this page. It's our fault not yours, so please try again later.
    Reloading the page may help.
    Any suggestions for us?

  • SQL query problem using analytical/report function

    Hello there,
    I am having some problem writing my query. I have this table below:
                  create table t (priority number,
                                  plannedamount number,
                                  availablepieces number,
                                  material_id varchar2(20))
    insert into t values (1, 15, 30, 'A');
    insert into t values (2, 20, 30, 'A');
    insert into t values (3, 5, 30, 'A');
    insert into t values (4, 8, 30, 'A');
    insert into t values (5, 4, 30, 'A');
    insert into t values (1, 2, 10, 'B');     PRIORITY|     PLANNED AMOUNT|AVAILABLE PIECES |     MATERIAL_ID
         1      15     30 A     
         2      20     30 A
         3      5     30 A
         4      8 30 A
         5      4     30 A
         1      2     30 B .
    Each line is a customer order ordering a material. I am grouping by material and ordering it by priority. I want to display a new column called pieces not reserved yet. This column will show that if the order can be fully reserved for that current order ordering by priority.
    If the row can be reserved it will substract and bring it to the next row. If it cannot the pieces not reserved will remain the same.
    I've tried using sum(), lead(), first(), lag(), etc but I still cannot get the correct result.
         PRIORITY|     PLANNED AMOUNT|PIECES NOT RESERVED YET |     MATERIAL_ID
         1      15     30 A     
         2      20     15 A
         3      5     15 A
         4      8     10 A
         5      4     2 A
         1      2     30 B
    Can anyone elaborate or have any hints on what method to use to create this column?
    Thanks. .
    Edited by: 998373 on Apr 5, 2013 11:42 AM
    Edited by: 998373 on Apr 5, 2013 11:43 AM

    From 10.x on
    with t(PRIORITY, PLANNED_AMOUNT,AVAILABLE_PIECES , MATERIAL_ID) as
    select      1, 15, 30, 'A' from dual union all
    select 2, 20, 30, 'A' from dual union all
    select 3, 5, 30, 'A' from dual union all
    select 4, 8, 30, 'A' from dual union all
    select 5, 4, 30, 'A' from dual union all
    select 1, 2, 30, 'B'  from dual
    select
      MATERIAL_ID
    , PRIORITY
    , PLANNED_AMOUNT
    , AVAILABLE_PIECES PIECES_NOT_RESERVED_YET
    from t
    model
    partition by (material_id)
    dimension by (PRIORITY)
    measures (
      PLANNED_AMOUNT
    , AVAILABLE_PIECES
    rules (
    AVAILABLE_PIECES[priority>1] order by priority=
      case when PLANNED_AMOUNT[cv()-1] <= AVAILABLE_PIECES[cv()-1]
           then AVAILABLE_PIECES[cv()-1] - PLANNED_AMOUNT[cv()-1]
           else AVAILABLE_PIECES[cv()-1]
      end
    MATERIAL_ID     PRIORITY     PLANNED_AMOUNT     PIECES_NOT_RESERVED_YET
    A     1     15     30
    A     2     20     15
    A     3     5     15
    A     4     8     10
    A     5     4     2
    B     1     2     30

  • Problem using SUM standard function  during Field Mapping

    Hi Experts ,
    I am trying to sum all LIFMG 's in in the lineitems of a particular
    header and map this result to Lifmg of the header.(Idoc with multiple headers and line item).I am using SUM standard function.
    Rough Source structure.
    Header1
          vbeln
    ....Lineitem1
          vbeln
          posnr
    ......LIFMG
    ....Lineitem2
            vbeln
            posnr
    ......LIFMG
    Header2
         vbeln
    ....Lineitem1
            vbeln
           posnr
    ......LIFMG
    ....Lineitem2
            vbeln
           posnr
    ......LIFMG
    I am able to find the SUM ...but in the target structure's Header field  I am getting
    repeated value of the corresponding sum in each header ...i.e.
    Header1
    LFIMG-- 100
    LFIMG    100
    Header2
    LFIMG-- 102
    LFIMG    102
    How to get a single value for each .
    Regards,
    Deepak

    Solved Myself ...
    Placed  sum after  if without else ...
    placing it before was causing ...those values to be replicated.

  • Some problems using some Matlab functions

    Hello,
    I have some trouble with MathScript when i want to use some MATLAB functions in it such as unique or histc. (i'm using windows 7 and LV2010 SP1)
    These functions are theoretically supported by MathScript insofar as they exist in MathScript Documentation but they return an error. This error explains that my matrix sizes are invalid but when we are doing exactly the same process with the same matrix in MATLAB, it ends well.
    So I checked the two MATLAB and MathScript documentations in order to see if there is a difference between the same functions. It is proving to be the same functionning in MathScript and in MATLAB so I am a little lost.
    In order to show you a concrete example :
    If we have a X matrix equals to (77 77; 88 96) and we are doing unique(X). The result is supposed to be (77 88 96) but mathscript returns an error.
    On the other hand, if X is not a matrix but a vector, unique ends well but i'm not interested in using some vectors (because it is exactly the same kind of problem with some others functions using only matrix).
    I could use a matlab node script but in this project, we would to avoid the use of a Matlab Licence.
    Do you have some idea in order to fix this kind of problem
    Thanks a lot

    Hi,
    Currently, the unique(X) in MathScript can accept vector input only. It reports error when X is a matrix. As a workaround, you can use
    unique(X(:))
    instead.

  • HT1338 I've updated my software but still get message "Some plugins used byu this page are out of date".  What do I do next to cure this problem?

    Does anyone know how to solve this problem?

    Could be because recent versions of Firefox do not accept most plug-ins.
    But for this there is a workaround:
    Open Firefox and type in the address bar: about:config (no spaces) and click return. This gives you a warning that it might harm the application. Ignore that and click on 'I'll be careful, I promise' and you get the config file that you can edit - with great care.
    Look/search (scroll down) for: firefox.plugins.enabled
    Set it to true. (Double click it to toggle it)
    Now close Firefox, open it again, and it now uses the plug-ins that Safari has stored.
    As for Java, not many web sites use Jave and for security reasons you should turn of Java, but Javascript is another matter (and something completely different) and this should be left on.

  • Memory problem using visa serial functions in my vi

    The last few days i created an application that reads data from one of
    serial ports (contactless card reader). Today i noticed that my
    application had crashed and Windows had displayed a message that my
    system was low on virtual memory. I reset the system and i re-run the
    application, having the task manager opened. I noticed that the memory
    usage of my exe was taking more and more memory (starting from
    21.520KB) as the seconds went by. In 5 minutes my app was using
    25Mbytes! What i do in my application exactly, is opening the serial
    port  then i enter the main while-loop, then every 2 seconds i read
    from the  serial and write them to a tag.
    I have used standard visa serial functions of Labview. When I trace my
    application and simultaneously run TASKManager of windows to see the
    memory, I saw that after running every Visa function memory usage goes
    up!!!
    what must I do? Please help me to overcome this problem.
    Thanks,
    M.Naghipourfar

    Trust me, people use serial communication with LV all the time without losing memory. I can't check the example at the moment, but If it had a problem someone would have caught on to it by now. In any case, even if using the serial VIs causes the memory usage to go up, it shouldn't be dramatic, definitely not enough to crash the application and consume all memory.
    Like I said, post your code (there is an attachment field when you write your message and you can save all your files into a single file by opening the main VI and selecting File>>Save with Options>>Development Distribution) and we will probably be able to find your problem.
    To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with. You can also contact your local NI office and join one of their courses.
    In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).
    Try to take over the world!

  • Problem using in download function

    Dear Experts,
    I am using download function to download values from application server to desktop.
    After downloading the output is like the foollowing.
    0    temp     30    bar(kg)
    But now the user requirement is I have to print it like the following.
    0/temp/30/bar(kg)
    I have to delete the space and have to give '/' sign.
    Please help me to fix this.
    Thanks in Advance
    Ansuman Parhi

    Hi,
      THis is a simple conversion.
       First Upload file from application server using dataset concept and Store Internal table of Char field like
       Begin of itab occurs 0,
         Data(200) type c,
       End of itab .
       then Split that into some fields  space
      Loop at itab.
          Split itab-data at  ' ' into  fields,
          Concatenate fields into itab-data seperated by '/'
          Modify Itab.
      endloop.
      Then download this.

  • Do others have a some problems using Firefox together with Charter? Mine is with my search.

    I have used and enjoyed Firefox for years. I have Charter cable and my homepage is Charter.net. When I try to use the Google search on that homepage screen, the results are terrible, giving me nothing more than Google search box (its entry) and a blank white screen.
    Is there a way I can take care of this problem?
    I don't have this problem when I try using Internet Explorer, but I'd much rather use Firefox. Thanks.

    Hello,
    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!
    Thank you.

  • Some problems with the count function

    Hi Guys,
    I am trying to return following:
    2009 GUESTS NIGHTS between 1 and 5 = 80 guests
    2009 GIESTS NIGHTS between 5 and 10 = 100 guest
    Whe I use the combine with a similar report option (union), I issue the following query:
    SELECT saw_0 saw_0, saw_1 saw_1, saw_2 saw_2, saw_3 saw_3 FROM ((SELECT Resort.Resort saw_0, Time."Year" saw_1, "Non Revenue Facts".Nights saw_2, count(Guests."Guest Name") saw_3 FROM GUEST WHERE "Non Revenue Facts".Nights BETWEEN 1 AND 5 GROUP BY saw_1, saw_2, saw_0) UNION (SELECT Resort.Resort saw_0, Time."Year" saw_1, "Non Revenue Facts".Nights saw_2, count(Guests."Guest Name") saw_3 FROM GUEST WHERE "Non Revenue Facts".Nights BETWEEN 1 AND 5)) t1 GROUP BY saw_1, saw_2, saw_0 , saw_3 ORDER BY saw_0
    The query return just the results for nights between 1 and 5.
    I need two columns showing the count of the guests with nights till 5 and one other column showing the count of the guests with nights from 5 to 10.
    Any help would be really appreciated.
    Regards
    Giuliano

    Sorry I did not get this.
    I should still use the union statement and than build the below function in the nights fields?
    What I am trying to achieve is simply how many guests do i have with at least 1 night and max 5 nights
    and how many guests i have with at least 5 nights and a max of 10 nights.
    I should have 2 columns:
    1 label Nights between 1 and 5
    2 label Nights beween 5 and 10
    the count(guests) column should than show how many guests in the first range and how many in the second.
    Regards
    G.

  • Problems using Camera Raw function in Bridge CS5.1

    Hey so I don't know what the heck is going on, but Camera Raw was working perfectly for me when I got this computer. It's a work computer, and all the programs were recently installed. I like using Camera Raw because of the easy basic editing and mass rendering (from .nef to .jpg) because I do a lot of shooting as a journalist.
    Like I said, it was working fine for me the past three weeks. Now I get this error message:
    Camera Raw editing is not enabled
    Camera Raw editing requires that a qualifying product has been launched at least once to enable this feature.
    I just installed the program, alongside PSE 12 Editor, and I have no idea how to fix this. Obviously, I've opened both Bridge and PSE, so I have no idea what I'm supposed to do now.
    Please please help. It's a MAJOR pain in the arse to have to edit every photo manually in PSE.

    You can use PSE with multiple Raw files also but Camera Raw in PSE has very limited options compared to the full ACR and also you can't save as jpeg via PSE.
    But do you have Photoshop CS5 installed because I can't find any info on that in your posts??
    Bridge CS4 was the only version that worked with PS elements (PSE 8??) but after that they discontinued the connection and since then PSE again uses its own organizer. So it is either using PSE for your work or you have to use Photoshop and Bridge.
    Adobe Camera Raw (ACR) is a plugin that comes with Photoshop. But Bridge has the option to also use this same plug in but it uses the PS version itself. If you open a Raw file in Bridge the normal way it opens in ACR via PS.
    If you choose right mouse click menu 'Open in Camera Raw' it uses ACR via Bridge. You can use both ACR at the same time. e.g. open multiple files in Bridge to load them as 'filmstrip mode' in the ACR window. Make your changes and choose 'save image'. While this jobs is running you can't use PS until the saving has finished.
    however if you return to Bridge and select another bunch and open this via 'Open in Camera Raw' the ACR window opens via Bridge. So while the first job is running in the background via PS you can start the second job via Bridge.
    Be sure to have the latest updates and the latest ACR version for Camera Raw (in your case it should be both PS and Bridge CS5.1 and ACR 6.7)
    In PS go to menu Photoshop / About Plug In / Camera Raw and this provides a window with the version of Camera Raw you are using.

Maybe you are looking for

  • Global Correlation Update Failures

    I've recently turned on Global Correlation but we've failed to update every 5 minutes. PL-ASA-IPS# show stat global Network Participation:    Counters:       Total Connection Attempts = 2       Total Connection Failures = 0       Connection Failures

  • Double click to open in Photoshop?

    Hi all, sorry if this is an amateur question. I'm trying to work out a way to double click photos and have them open in Photoshop. When I go to preferences, I can change the double click behavior, but no option exists to open in an external editor. A

  • Update all flash-related software modules?

    I cannot figure out how to update all .dll and .ocx flash-related files on my system.  I have already gone through the usual update routine by visiting http://www.adobe.com/software/flash/about/, which tells me I have version 10.0.32.18 of Flash play

  • Using TPC : no connector when adding a new "Document Repository"

    I've followed the Oracle TPC (Team Productivity Center) step-by-step tutorial, I've some connectors under "Work Item Repository" and "Versioning Repository" but none under "Document Repository". I don't know what to install to get them. (JIRA, BugZil

  • Keep Podcasts in iTunes in sync with two Macs

    I see the guide on MacRumors on how to keep music library in sync, but I don't want to loan the entire music library on both Macs. I just want to keep all the Podcasts in sync. Any thoughts on how to do this?