CAN I USE GROUP BY SCRIPT AT CURSOR.?

I USE GROUP BY SCRIPT AT CURSOR, SO THAT CURSOR DOESN'T WORK.
CAN I USE GROUP BY SCRIPT AT CURSOR.?
THANK YOU !! HAVE A NICE DAY ^^
Message was edited by:
악어조심

Thank you Francois ^^
I will use that query program unit at form builder
Forms [32 Bit] Version 6.0.8.11.3 (Production)
Oracle Toolkit Version 6.0.5.35.0 (Production)
PL/SQL Version 8.0.6.0.0 (Production)
Oracle Procedure Builder V6.0.8.11.0 Build #449 - Production
PL/SQL Editor (c) WinMain Software (www.winmain.com), v1.0 (Production)
Oracle Query Builder 6.0.7.0.0 - Production
Oracle Virtual Graphics System Version 6.0.5.35.0 (Production)
Oracle Tools GUI Utilities Version 6.0.5.35.0 (Production)
Oracle Multimedia Version 6.0.5.34.0 (Production)
Oracle Tools Integration Version 6.0.8.10.2 (Production)
Oracle Tools Common Area Version 6.0.5.32.1
Oracle CORE Version 4.0.6.0.0 - Production
Message was edited by:
악어조심

Similar Messages

  • Can we use Column Names in Parameter Cursor

    Hi
    can we use Column Names in Parameter Cursor??
    DECLARE
    CURSOR Emp_Cur (P_Deptno NUMBER)
    IS
    SELECT Empno, Ename
    FROM Emp
    WHERE Deptno = P_Deptno;
    BEGIN
    FOR Emp IN Emp_Cur(10)
    LOOP
    DBMS_OUTPUT.PUT_LINE('The Employee Number is: '||emp.Empno);
    DBMS_OUTPUT.PUT_LINE('The Employee Name is: '||emp.Ename);
    END LOOP;
    FOR Emp IN Emp_Cur(20)
    LOOP
    DBMS_OUTPUT.PUT_LINE('The Employee Number is: '||emp.Empno);
    DBMS_OUTPUT.PUT_LINE('The Employee Name is: '||emp.Ename);
    END LOOP;
    END;
    In the above Program, I send Deptnumber. If i send Column names like Empno, Ename. What can i do??
    If Declare Samething Through Parameter Cursor, it doesn't accept VARCHAR2(Size)

    For parameters you don't use size, just the type (DATE, NUMBER, VARCHAR2, CLOB, ...)
    DECLARE
      CURSOR Emp_Cur (P_Ename VARCHAR2)
      IS
        SELECT Empno, Ename
        FROM Emp
        WHERE Ename = P_Ename;
    BEGIN
      FOR Emp IN Emp_Cur('SCOTT')
      LOOP
        DBMS_OUTPUT.PUT_LINE('The Employee Number is: '||emp.Empno);
        DBMS_OUTPUT.PUT_LINE('The Employee Name is: '||emp.Ename);
      END LOOP;
    END;

  • Can we use Group by Clause here?

    All,
    Can we use group by clause in the date column?
    If yes, will it work for these kind of values '11/12/2009 12:30:45 PM' and '11/12/2009 4:30:45 PM'......

    Hi,
    frontier007 wrote:
    All,
    Can we use group by clause in the date column?
    If yes, will it work for these kind of values '11/12/2009 12:30:45 PM' and '11/12/2009 4:30:45 PM'......Yes, GROUP BY works with DATEs.
    Remember that DATEs always include hours, minutes and seconds, so '11/12/2009 12:30:45 PM' and '11/12/2009 4:30:45 PM', though they are in the same calendar day, are different DATE values. If you want them to be in the same group, then use TRUNC.
    For example:
    SELECT    TRUNC (entry_date)      AS entry_dt
    ,         SUM (amount)            AS daily_amount
    FROM      orders
    GROUP BY  TRUNC (entry_date)
    ;Edited by: Frank Kulash on Oct 30, 2009 4:55 AM

  • How can I use group messaging on a iphone 4 ?

    I want to use group messaging on my iphone 4.
    how do I enable it ?

    that option doesn't appear on my settings section.

  • Can I use a VB SCript to enable Num Lock at logon in Win 8.1 with Update 1?

    Hope this is the correct place for this - someone directed me to the TechNet Forums from the Windows 8.1 general forum, and then from the 'Windows Forms General' forum to one on Scripting and now to this one on Group Policy this one.  Hope I have now
    got to the correct technical forum to answer the question below, which is driving me nuts.
    In the good old days of Windows XP, I was able to ensure Num Lock was on at boot up by the use of a small VB Script file, which was this:
    set WshShell = CreateObject("WScript.Shell")
    WshShell.SendKeys "{NUMLOCK}"
    It is really annoying with Win 8.1 that on Boot Up, AND
    every time I want to switch user, Num Lock goes off (even if it was on before switching user).  I want Num Lock to be on at Boot Up AND stay on when switching user.
    I have seen the suggested remedies in other forums about changing the appropriate value in the Registry (which does not work until after logon) and changing the BIOS setting (which does not work because Windows overrules the BIOS setting).  The question
    is whether the VBScript solution will work with Win 8.1 with Update 1?
    If it will, in which folder do I put the Script file in order for it to work for all Users?
    And do I have to make the any changes to Group Policy to make it work, and if so what changes, as seems to be the case if the OS was Win 7 (mine is Win 8.1 Update 1, and NOT Win 8 Pro).
    Thanks in advance for any help on this one.  Please note, I am NOT an expert user, so please try and explain any shorthand you use that you take for granted but which I won't understand!!
    Neil

    Thanks for this reply, RBoyde, but........
    ... as my orignal message suggested, I have hardly a clue what you are saying and the link doesn't help me understand any better either (as it doesn't seem to help with how to do something with an existing Registry key).
    To be speciific:
    1.  what script do I write?
    2.  where do I save it so it works for all users at logon AND on switching users?
    3.  how do I "run it as a logon script via group policy"????
    Perghaps I need to add that this is a single, standalone, home PC, with 2 users, running Win 8.1 Core/Basic.  Also, I cannot find the Group Policy Editor on the PC; when I type either 'gpedit' or 'gpedit.msc' into Run, I get a message saying that the
    file canot be found on the PC.  This when logged on as user with administrator powers.  It is not found either from a Command prompt.  And there does not seem to be a GP Snap-in available via the MM Console.
    Please clarify for me what looks to be a helpful response - for I am just a 'bear of little brain' (as per Winnie the Pooh).
    Neil

  • PSEUDO distinct - But Can't use Group By

    Hi,
    I want to find just one row from a table (and I don't care which), for a set of distinct values from just one column. I want ALL columns returned.
    I have BOTH some sample data below, and SQL below to create the table/make sample data - but another example would be a query that returns all columns from a table of people (PERSON_ID, FIRST_NAME, MIDDLE_NAME, LAST_NAME, DOB), but only one row per unique last name. So if there were 400 people with the last name of Smith - just return one Smith, any Smith it doesn't matter, but just one. Please remember it must return all columns.
    Can this be done without a subquery??? It is impossible to 'group' on the other columns in this situation and get the desired results. I could not find this in my search here or other SQL forums.
    Sample Data - The query I want returns THREE rows with all (both) columns, and I don't care which three but the value in COLUMN_TO_BE_DISTINCT would be 100005, 100011, 100035 along with a corresponding TABLE_PK. Please it must return ALL columns.
    Thanks!!
    TABLE PK     COLUMN_TO_BE_DISTINCT
    287353423799537081     100005
    357435342379953058     100005
    353035342379952548     100005
    674435342379952335     100005
    339035342379954171     100005
    140535342379947195     100005
    324735342379952751     100005
    430835342379949491     100005
    674235342379951367     100005
    487335342379944951     100005
    833435342379953537     100005
    429335342379946296     100011
    181435342379953878     100035
    133135342379948378     100035
    986035342379948044     100035
    982235342379954477     100035
    977935342379954245     100035
    685135342379951514     100035
    551335342379946611     100035
    298835342379949047     100035
    119035342379953236     100035
    971435342379952961     100035
    **Example Data SQL**
    create table PERSON (person_id number, first_name varchar2(20), last_name varchar2(40), middle_name varchar2(20) , birth_date date);
    insert into t values (1,'Bob', 'Smith', to_date('01/01/2009','DD/MM/YYYY'));
    insert into t values (2,'Jane', 'Smith', to_date('03/01/1909','DD/MM/YYYY'));
    insert into t values (3,'George', 'Wallace', to_date('06/22/2009','DD/MM/YYYY'));
    insert into t values (4,'Frank', 'Wallace', to_date('01/01/2009','DD/MM/YYYY'));
    insert into t values (5,'Jim', 'Johnson', to_date('01/01/2009','DD/MM/YYYY'));
    insert into t values (6,'Jennifer', 'Johnson', to_date('04/01/1949','DD/MM/YYYY'));
    insert into t values (7,'Susan', 'Johnson', to_date('10/01/1999','DD/MM/YYYY'));
    insert into t values (8,'Walter', 'Johnson', to_date('01/22/2001','DD/MM/YYYY'));
    The query I am trying to create would return only three rows --- one row with a Smith, one row with a Wallace, and one with a Johnson - ALL COLUMNS, but just three rows. Which Smith, which Wallace, which Johnson....it doesn't matter.

    Please try this...
    Ranit>> select * from (
      2      select t.*,row_number() over(partition by last_name order by person_id) rn
      3      from t) xx
      4      where xx.rn = 1;
    PERSON_ID FIRST_NAME           LAST_NAME                                      
    BIRTH_DAT         RN                                                           
             5 Jim                  Johnson                                        
    01-JAN-09          1                                                           
             1 Bob                  Smith                                          
    01-JAN-09          1                                                           
             4 Frank                Wallace                                        
    01-JAN-09          1                                                            *Your Insert scripts had some errors, so i removed the 'middle_name' column.
    Ranit>> desc t;
    Name                                      Null?    Type
    PERSON_ID                                          NUMBER
    FIRST_NAME                                         VARCHAR2(20)
    LAST_NAME                                          VARCHAR2(40)
    BIRTH_DATE                                         DATEEdited by: ranit B on Dec 16, 2012 12:34 AM
    -- o/p added

  • Can't use arrow keys to move cursor around TextArea after upgrading to 1.4

    Hi,
    I saw that there have been similar posts, but none are exactly the same nor have they solved my problem...
    I've got an older Java application that has been around for many years,
    the only updates to it essentially being upgrading the version of the
    JDK. So far, upgrading the JDK hasn't caused any issues. However, after upgrading to JDK 1.4, I can no longer use the arrow keys on the
    keyboard to move the cursor within a TextArea. You can use the mouse to highlight and you can use the rest of the keys (i.e. type in text,
    delete stuff, etc.) but somehow you just can't move the cursor around
    by using the keyboard. Does anybody have any suggestions on what I
    could do to solve this? Thanks in advance!

    Didn't get any replies/comments, but in case anybody is interested, I took the easy way out and upated the TextArea to a JTextArea and the problem went away.

  • How can I use normal JSP-Scripting in Studio Creator pages ?

    Hello,
    if I try to integrate for example
    <jsp:scriptlet>
    for(int i=0; i < 10; i++) {
    out.println("Txt: " + i);
    </jsp:scriptlet>
    in my JSP Page it dosn't wok because the IDE complains that the jsp-document isn't wellformed due to the < sign.
    If you replace the < by and < the IDE dosn't complain any longer but you get an runtime error during execution of the page because the jsp-page can't be compiled by the jsp-compiler.
    Does everybody nows how to integrate normal jsp-scripting in the page

    Hi
    I have not copied any jar files to any folders. The default installation executes this code without any compilation errors. I am running this on Sun Application Server. I have not tried on Tomcat. But if it asks for tools.jar, you can copy this jar file to <creator-root>/java/lib directory or <Creator-root>/SunAppServer8/lib directory.
    Thanks
    Srinivas

  • Keep getting this message and can't use the browser, "Script: chrome://vidbar/content/downloader.js:117"

    what more do you need to know? i get this message "Script: chrome://vidbar/content/downloader.js:117" and the browser is useless until i restart.

    Hi,
    I was having the exact same problem while browsing some sites (Google news, Google image search, Youtube).
    It was caused by the "Screenshot Pimp" extension. I uninstalled it and all is OK now.
    It looks like this extension packs a lot of "generic" code that is not used by the extension but could be used by other extensions from the same publisher (Mediapimp).
    So if you have this extension try removing it (not just disabling it). If you don't, look for other extensions like viddownloader, Youtube downloader, Video downloader, Mediapimp, etc. and remove them one by one until your browser is back to normal.

  • I can't use my back and forward cursor, how do I make them work?

    My forward and back cursors are not enabled.
    == This happened ==
    Just once or twice
    == My firefox shut down

    Go to '''View--Toolbars''' and make sure '''Navigation Toolbar has a checkmark next to it.
    If you do not have the menu bar either, press '''ALT V T M__ to get your menu bar back

  • How to use group function in insert or update

    Hai All
    How can we use group function in insert or update statement
    I am generating an attendance so i have different set of timing for example
    0800,1200,1230, 1700 and i need to insert into these data into table with min value to intime and max value to
    outtime and othere to inertval time in or out
    Pls tell me with some example
    For example
    For INSERT
    insert into T2 (barcode,empcode,intime,attend_date)
                   values(r2.cardn,r2.enpno,MIN(r2.ptime),r2.pdate);
    For UPDATE
    update dail_att set outtime= MAX(r2.ptime) where empcode=r2.enpno and barcode=r2.cardn and
    attend_date=r2.pdate;
    Here instead of where i need to use having so pls tell how to use
    Thanks & Regards
    Srikkanth.M

    Hai Man
    R2 is not a table name its a record
    Let me explain clearly
    I have to generate daily attendance for lot of employees So i have two table t1 and t2
    T1 consist of three column empno,date,time
    T2 consist of empno,name,date,intime,outtime,intrin,introut
    So now i need to give the T1 Min value Of time to T2 Intime and T1 Max value of Time to T2 Outtime fields so there so many records while i am using
    max(time) it gives the max value of all so i seperated by group function so now i have an error in subquery ie it is an single row subquery so i need to use multiple row subquery how i can use multiple row subquery in update statement
    Thanks In Advance
    Srikkanth.M

  • How to use BULK COLLECT in ref cursor?

    hi,
    can we use bulk collect in ref cursor ? if yes then please give small example ..
    thanks

    Try this:
    create or replace type person_ot as object (name varchar2(10)) not final;
    create or replace type student_ot under person_ot (s_num number) not final;
    create type person_tt as table of person_ot;
    create table persons of person_ot;
    declare
    lv_person_list person_tt;
    lv_sql varchar2(1000);
    ref_cur sys_refcursor;
    begin
    lv_sql:= 'select new student_ot(''fred'', 100) from dual
    union all
    select new student_ot(''sally'', 200) from dual';
    open ref_cur for lv_sql;
    fetch ref_cur bulk collect into lv_person_list;
    close ref_cur;
    for i in lv_person_list.first..lv_person_list.last loop
    dbms_output.put_line(lv_person_list(i).name );
    end loop;
    forall i in lv_person_list.first..lv_person_list.last
    insert into persons values lv_person_list(i);
    end;
    /

  • Using SQL Loader script in a Stored Procedure

    Can I use SQL Loader script in a stored procedure and then execute it from a front-end appl.? The reason for this seemingly convoluted solution is that the users don't want a batch load though the records volume is quite high (around 1 mil). Other loads using ODBC connection or OLE DB seem to be inferior to SQL Loader.

    I would suggest a couple of solutions:
    1. Have a cgi script that can upload the file to the server from a web ui, then have the cgi script call the sql*loader file, and it will insert into the database.
    2. You can try to use External tables. This is avaliable in 9i and onwards. You will be able to make any sql DML on the external table.
    I would normally use sql*loader, move the data to a staging table with nologging, and paralle loading. After it has been loaded into the staging table I would process it into my main tables. Have used this approach with up to 60 million records in one load.
    You can do calls to C procedures, Pro*C procedures through PLSQL, as well as java calls, or use Java stored procedures.
    My experience is that SQL*Loader is the fastest way to load data into the database.

  • Displaying of records unable to using GROUP BY

    Hi,
    I have a requirement where i need to display the records based upon item types:I have the records like as
    Invoice Number Item Type Amt
    23221 LI 23
    23231 SD 45
    23221 LI 11
    23221 ST 14
    I want to display as:
    Invoice Number Item Type Amt
    23221 LI 34
    23231 SD 45
    23221 ST 14
    Any help will be needful for me

    918308 wrote:
    Hi,
    I have a requirement where i need to display the records based upon item types:I have the records like as
    Invoice Number Item Type Amt
    23221 LI 23
    23231 SD 45
    23221 LI 11
    23221 ST 14
    I want to display as:
    Invoice Number Item Type Amt
    23221 LI 34
    23231 SD 45
    23221 ST 14
    Any help will be needful for meLike Karthik I wonder why you can't use GROUP BY. Using GROUP BY would be easiest. I also do not understand why when you said you can't use GROUP BY every example posted so far as used it.
    Anyway, ...
    Consider the analytic sum() function. Here is an example you can adapt to your needs - the COUNT() I am using is similar to the SUM() you need
    select distinct cd_id, count(cd_id) over (partition by cd_id)
      from m_cd_tracks
    order by 1
    CD_ID   COUNT()
    1     34
    2     32
    3     32
    4     32
    5     30The analytic COUNT() is similar to the GROUP BY COUNT() but it returns every row. DISTINCT eliminates the duplicates. The OVER () clause allows the PARTITION definition which defines the group. You can read all about the analytic functions in the online documentation.

  • How to use Group Policy to remove the shutdown button on the logon screen

    Environment:  Shared use computers running Window 7 Professional and MS office Suite; Windows 2008 Standard server, Windows 7 EC Domain Policy and MS Office 2007 ADML Template downloaded from Microsoft. WIndows 7 Accounts OU.
    I am in the process of developing a shared use computer lockdown policy for several Windows 7 computers that will made available in my client's computer lab.  I need to use a group policy setting to remove the Shut Down button on
    the logon screen of the Windows 7 client computers.  I am editing the Windows 7 EC Domain Policy to user accounts in a Windows 7 Accounts OU that I created.  I am using the Group Policy editor in the Group Policy Management Console.  
    Please let me know the best practice for accomplishing this using Group Policy editor.
    Thanks.
    P.S. I tried a setting recommended in the following link in the Windows 7 EC Domain Policy which did not seem to work.
    http://www.windowsitpro.com/article/group-policy/can-i-use-group-policy-to-display-or-remove-the-shut-down-button-on-the-logon-screen-.aspx

    Hi Vernon,
    I tried the group policy you mentioned (Computer Configuration, Windows Settings, Security Settings, Local Policies, and select Security Options, "Shutdown: Allow system to be shut down without having to log on") and it worked on a Windows 7 client.
    Thus you may need to check if the group policy you created is actually applied to clients.
    A screenshot can be found here:
    http://cid-b7ed40feb32ba29f.office.live.com/self.aspx/.Public/desktop/Capture.JPG

Maybe you are looking for