Can window and aggregate SQL functions be used in Pro*C embedded SQL?

It appears that window functions such as dense_rank() over(partition by ... order by ...) can not be used in Pro*C embedded SQL? Can somebody confirm that that is really the case?
Thanks
Rawender Guron

Please refer to this thread: "Is this forum also used for Pro*'C Questions? "
Is this forum also used for Pro*'C Questions?

Similar Messages

  • Can window and aggregate SQL functions used in Pro*C embedded SQL?

    It appears that the window functions such as dense_rank() over(partition by ... order by ...) are not available in Pro*C embedded SQL. Can somebody please confirm that that is really the case?
    Thanks
    Rawender Guron

    Please refer to this thread: "Is this forum also used for Pro*'C Questions? "
    Is this forum also used for Pro*'C Questions?

  • Can Window and aggregate functions be used in Pro*C?

    Are Window functions like dense_rank() over (partition by ... order by ..) available in Pro*C embedded SQL?
    Thanks
    Rawender Guron

    Please refer to this thread: "Is this forum also used for Pro*'C Questions? "
    Is this forum also used for Pro*'C Questions?

  • Which SQL function to use to get previous month's data?

    Hi
    The reporting need: Display of two month's payroll run results....current and previous (based on the parameter passed) in Oracle Discoverer.
    Data source: A table in which run result values are stored. Of course to be linked to number of other tables.
    Can somebody guide me on which SQL function to use to get the data for previous month?
    Secondly, as Discoverer does not support parameters, I cannot put parameter in the query itself. I'll be applying parameter later while generating my report.
    Please advice.
    Thanks and regards,
    Aparna

    It's not very clear in my head... but you can try :
    SQL> select * from test;
    ENAM        SAL DT
    TOTO       1000 30/05/06
    TOTO       1001 20/04/06
    TOTO       1002 11/03/06
    TATA       2000 30/05/06
    TATA       1500 20/04/06
    TUTU       3500 30/05/06
    6 rows selected.
    SQL> select ename, dt, sal currmonth,
                case when trunc(lag(dt,1,dt) over (partition by ename order by dt),'MM') = trunc(add_months(dt,-1),'MM')
                     then lag(sal,1,sal) over (partition by ename order by dt)
                     else null end prevmonth
         from   test
    SQL> /
    ENAM DT        CURRMONTH  PREVMONTH
    TATA 20/04/06       1500
    TATA 30/05/06       2000       1500
    TOTO 11/03/06       1002
    TOTO 20/04/06       1001       1002
    TOTO 30/05/06       1000       1001
    TUTU 30/05/06       3500
    6 rows selected.
    SQL>
    SQL> Nicolas.
    Just an additional question : do the previous month is current month-1, or is there hole in month suite (e.g. the previous month can be current month-2) ?
    Message was edited by:
    N. Gasparotto

  • Can the 100% browser width function be used in non-master pages?

    Can the 100% browser width function be used in non-master pages? I watched the video about pulling it to the red edges, and did that on some of my parent pages, but when I preview the page in browser, it doesn't work. I can still see my browser edges.
    The idea for the website I am designing is to have different full browser width images for different pages, and I'm looking for a way to do that. I would create a different master for each page, but there are more than 20 pages...too many master pages! Thanks!

    Hi Lindsey,
    The 100% width feature works with rectangles and text frames on both master pages as well as regular pages. It doesn't work with images in either case. A possible workaround would be to use a rectangle with a background image, depending on the nature of your image.
    Regards,
    Nathan

  • I have an iPad 2 and iPhone 4 and for them I use I cloud I have also 1 pc windows and at work place I use windows pc ; until now my files are stored on an external disk drive could' I use iCloud to perform the backup of my external disk drive ? Thanks

    I have an iPad 2 and iPhone 4 and for them I use I cloud I have also 1 pc windows and at work place I use windows pc ; until now my files are stored on an external disk drive could' I use iCloud to perform the backup of my external disk drive ? Thanks
    Loredano

    These are the options you have.
    Budget $1299.
    http://www.apple.com/macbookair/
    http://www.apple.com/macbookpro/
    Best.

  • My sister can see and hear me when we use FaceTime but my screen is just black...help

    My sister can see and hear me when we use FaceTime but my screen is just black...help

    Restore the device to factory settings and add your content, then try again.
    If no change, then something maybe wrong with the iSight camera at the front, so make an appointment with someone at the Genius bare at your local Apple retail store.

  • HT4796 Can Windows 7 be installed on my new MacBook Pro, through my network connection?  The disc would be in my Windows desktop.

    Can Windows 7 be installed on my new MacBook Pro, through my network connection?  The disc would be in my Windows desktop.

    I wouldn't recommend installing through a network connection.
    For a Virtual Machine:
    If you have the Win 7 media (DVD), use an app like PowerISO or MagicISO to make an ISO file of the install disc and use that.
    For BootCamp:
    Use the original install media and BootCamp Assistant, to install from your DVD Drive.

  • PRO*C에서 EMBEDDED SQL STATEMENTS를 사용해서 LOB DATATYPES에 접근하는 예제

    제품 : PRECOMPILERS
    작성날짜 : 2001-07-12
    PRO*C에서 EMBEDDED SQL STATEMENTS를 사용해서 LOB DATATYPES에 접근하는 예제
    ==========================================================================
    Pro*C에서 LOB를 사용하는 방법에는 다음 3가지가 있습니다.
    (1) PL/SQL blocks에서 DBMS_LOB package를 이용하는 방법
    (2) OCI function을 이용하는 방법
    (3) Embedded SQL statements을 이용하는 방법
    다음은 (3)번째 방법에 대한 pro*c에서 지원하는 명령어들입니다.
    o APPEND: Appends lob value at the end of another LOB.
    EXEC SQL LOB APPEND :src TO :dst;
    o ASSIGN: Assigns LOB or BFILE locator to another.
    EXEC SQL LOB ASSIGN :src TO :dst;
    o CLOSE: Close LOB or BFILE.
    EXEC SQL LOB CLOSE :src;
    o COPY: Copy all or part of LOB value into another LOB.
    EXEC SQL LOB COPY :amt FROM :src [AT :src_offset] TO :dst [AT dst_offset];
    o CREATE TEMPORARY: Creates a temporary LOB.
    EXEC SQL LOB CREATE TEMPORARY :src;
    o ERASE: Erase the given amount of LOB data starting from a given offset.
    EXEC SQL LOB ERASE :amt FROM :src [AT :src_offset];
    o FILE CLOSE ALL: Closes all the BFILES open in the current session.
    EXEC SQL LOB FILE CLOSE ALL;
    o FILE SET: Set DIRECTORY alias and FILENAME in a BFILE locator.
    EXEC SQL LOB FILE SET :file DIRECTORY = :alias, FILENAME = :filename;
    o FREE TEMPORARY: Free the temporary space for the LOB locator.
    EXEC SQL LOB FREE TEMPORARY :src
    o LOAD FROM FILE: Copy all or part of BFIL into an internal LOB.
    EXEC SQL LOB LOAD :amt FROM FILE :file [AT :src_offset]
    INTO :dst [AT :dst_offset];
    o OPEN: Open a LOB or BFILE for read or read/write.
    EXEC SQL LOB OPEN :src [ READ ONLY | READ WRITE ];
    o READ: Reads all or part of LOB or BFILE into a buffer.
    EXEC SQL LOB READ :amt FROM :src [AT :src_offset]
    INTO :buffer [WITH LENGTH :buffer];
    o TRIM: Truncates the LOB vlaue.
    EXEC SQL LOB TRIM :src to :newlen;
    o WRITE: Writes contents of the buffer to a LOB.
    EXEC SQL LOB WRITE [APPEND] [FIRST | NEXT | LAST | ONE ]
    :amt FROM :buffer [WITH LENGTH :buflen] INTO :dst [AT :dst_offset];
    o DESCRIBE: Retrieves the attributes from a LOB.
    EXEC SQL LOB DESCRIBE :src GET attribute1 [{, attributeN}]
    INTO :hv1 [[INDICATOR] :hv_ind1] [{, :hvN [[INDICATOR] :hv_indN] }];
    Attributes can be any of the following:
    CHUNKSIZE: chunk size used to store the LOB value
    DIRECTORY: name of the DIRECTORY alias for BFILE
    FILEEXISTS: whether BFILE exists or not
    FILENAME: BFILE name
    ISOPEN: whether BFILE with this locate is OPEN or not
    ISTEMPORARY: whether specified LOB is temporary or not
    LENGTH: Length of BLOBs and BFILE in bytes, CLOBs and NCLOBs
    in characters.
    다음은 LOB를 사용하는 sample을 실행하는 방법입니다.
    1. 먼저 scott user에서 다음을 실행합니다. (create directory를 할 수 있는 권한이
    있어야 하며, directory는 사용하시는 환경에 맞도록 수정해 주십시요.)
    drop table lob_table;
    create table lob_table (key number, a_blob BLOB, a_clob CLOB);
    drop table lobdemo;
    create table lobdemo (key number, a_blob BLOB, a_bfile BFILE);
    drop directory dir_alias;
    create directory dir_alias as '/users/app/oracle/product/8.1.7/precomp/demo/proc';
    insert into lob_table values(1, utl_raw.cast_to_raw('1111111111'), 'aaaaaaaa');
    commit;
    2. 다음 코드는 out.gif 파일을 위에서 지정한 directory에 만들고 lob_table의
    내용에 들어있는 BLOB의 내용을 저장하는 sample입니다.
    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
    #include <sqlda.h>
    #include <sqlcpr.h>
    /* Define constants for VARCHAR lengths. */
    #define UNAME_LEN 20
    #define PWD_LEN 40
    /* Declare variables. No declare section is
    needed if MODE=ORACLE. */
    VARCHAR username[UNAME_LEN]; /* VARCHAR is an Oracle-supplied struct */
    varchar password[PWD_LEN]; /* varchar can be in lower case also. */
    /* The following 3 lines avoid inclusion of oci.h during precompilation
    oci.h is needed only during compilation to resolve calls generated by
    the precompiler
    #ifndef ORA_PROC
    #include <oci.h>
    #endif
    #include <sqlca.h>
    OCIBlobLocator *blob;
    OCIClobLocator *clob;
    FILE *fp;
    unsigned int amt, offset = 1;
    #define MAXBUFLEN 5000
    unsigned char buffer[MAXBUFLEN];
    EXEC SQL VAR buffer IS RAW(MAXBUFLEN);
    /* Declare error handling function. */
    void sql_error(msg)
    char *msg;
    char err_msg[128];
    size_t buf_len, msg_len;
    EXEC SQL WHENEVER SQLERROR CONTINUE;
    printf("\n%s\n", msg);
    buf_len = sizeof (err_msg);
    sqlglm(err_msg, &buf_len, &msg_len);
    printf("%.*s\n", msg_len, err_msg);
    EXEC SQL ROLLBACK RELEASE;
    exit(EXIT_FAILURE);
    void main()
    /* Connect to ORACLE--
    * Copy the username into the VARCHAR.
    strncpy((char *) username.arr, "SCOTT", UNAME_LEN);
    /* Set the length component of the VARCHAR. */
    username.len =
    (unsigned short) strlen((char *) username.arr);
    /* Copy the password. */
    strncpy((char *) password.arr, "TIGER", PWD_LEN);
    password.len =
    (unsigned short) strlen((char *) password.arr);
    /* Register sql_error() as the error handler. */
    EXEC SQL WHENEVER SQLERROR DO sql_error("ORACLE error--\n");
    /* Connect to ORACLE. Program will call sql_error()
    * if an error occurs when connecting to the default database.
    EXEC SQL CONNECT :username IDENTIFIED BY :password;
    printf("\nConnected to ORACLE as user: %s\n", username.arr);
    /* Allocate the LOB host variables and select the BLOB value */
    EXEC SQL ALLOCATE :blob;
    EXEC SQL ALLOCATE :clob;
    EXEC SQL SELECT a_blob INTO :blob FROM lob_table WHERE key=1;
    /* Open external file to which BLOB value should be written */
    fp = fopen("out.gif", "w");
    EXEC SQL WHENEVER NOT FOUND GOTO end_of_lob;
    amt = 5000;
    EXEC SQL LOB READ :amt FROM :blob AT :offset INTO :buffer;
    fwrite(buffer, MAXBUFLEN, 1, fp);
    EXEC SQL WHENEVER NOT FOUND DO break;
    /* Use polling method to continue reading the next pieces */
    while (TRUE)
    EXEC SQL LOB READ :amt FROM :blob INTO :buffer;
    fwrite(buffer, MAXBUFLEN, 1, fp);
    end_of_lob:
    fwrite(buffer, amt, 1, fp);
    printf("\nG'day.\n\n\n");
    /* Disconnect from ORACLE. */
    EXEC SQL ROLLBACK WORK RELEASE;
    exit(EXIT_SUCCESS);
    3. 다음 코드는 위에서 만든 out.gif file을 lobdemo에 저장하는 sample입니다.
    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
    #include <sqlda.h>
    #include <sqlcpr.h>
    /* Define constants for VARCHAR lengths. */
    #define UNAME_LEN 20
    #define PWD_LEN 40
    /* Declare variables. No declare section is
    needed if MODE=ORACLE. */
    VARCHAR username[UNAME_LEN]; /* VARCHAR is an Oracle-supplied struct */
    varchar password[PWD_LEN]; /* varchar can be in lower case also. */
    /* The following 3 lines avoid inclusion of oci.h during precompilation
    oci.h is needed only during compilation to resolve call generated by
    the precompiler
    #ifndef ORA_PROC
    #include <oci.h>
    #endif
    #include <sqlca.h>
    OCIBlobLocator *blob;
    OCIBFileLocator *bfile;
    char *alias = "DIR_ALIAS";
    char *filename = "out.gif";
    unsigned int amt = 50;
    unsigned int filelen;
    /* Declare error handling function. */
    void sql_error(msg)
    char *msg;
    char err_msg[128];
    size_t buf_len, msg_len;
    EXEC SQL WHENEVER SQLERROR CONTINUE;
    printf("\n%s\n", msg);
    buf_len = sizeof (err_msg);
    sqlglm(err_msg, &buf_len, &msg_len);
    printf("%.*s\n", msg_len, err_msg);
    EXEC SQL ROLLBACK RELEASE;
    exit(EXIT_FAILURE);
    void main()
    /* Connect to ORACLE--
    * Copy the username into the VARCHAR.
    strncpy((char *) username.arr, "SCOTT", UNAME_LEN);
    /* Set the length component of the VARCHAR. */
    username.len =
    (unsigned short) strlen((char *) username.arr);
    /* Copy the password. */
    strncpy((char *) password.arr, "TIGER", PWD_LEN);
    password.len =
    (unsigned short) strlen((char *) password.arr);
    /* Register sql_error() as the error handler. */
    EXEC SQL WHENEVER SQLERROR DO sql_error("ORACLE error--\n");
    /* Connect to ORACLE. Program will call sql_error()
    * if an error occurs when connecting to the default database.
    EXEC SQL CONNECT :username IDENTIFIED BY :password;
    printf("\nConnected to ORACLE as user: %s\n", username.arr);
    /* Allocate the LOB locator */
    EXEC SQL ALLOCATE :blob;
    EXEC SQL ALLOCATE :bfile;
    /* Initialize the DIRECTORY alias of the BFILE and FILENAME */
    EXEC SQL LOB FILE SET :bfile
    DIRECTORY = :alias, FILENAME = :filename;
    EXEC SQL INSERT INTO lobdemo values (1, EMPTY_BLOB(), :bfile);
    EXEC SQL SELECT a_blob, a_bfile INTO :blob, :bfile FROM lobdemo
    WHERE key = 1;
    EXEC SQL LOB OPEN :bfile;
    /* Get the BFILE length */
    EXEC SQL LOB DESCRIBE :bfile
    GET LENGTH INTO :filelen;
    printf("File length is: %d\n", filelen);
    amt = filelen;
    /* Read BFILE and write to BLOB */
    EXEC SQL LOB LOAD :amt FROM FILE :bfile INTO :blob;
    EXEC SQL LOB CLOSE :bfile;
    printf("\nG'day.\n\n\n");
    /* Disconnect from ORACLE. */
    EXEC SQL COMMIT WORK RELEASE;
    exit(EXIT_SUCCESS);
    4. 다음은 실행한 결과 입니다.
    첫번째 sample :
    Connected to ORACLE as user: SCOTT
    G'day.
    두번째 sample :
    Connected to ORACLE as user: SCOTT
    File length is: 10
    G'day.

  • All the SQL functions - to use in Discoverer-desktop reporting?

    Hi ,
    Can anyone tell me where i can find all the SQL functions, <conditional stmts> etc - to use in Discoverer-desktop reporting?.
    Thx, Sree

    Hi,
    I am not quite sure what you mean. You can see all the functions available when you edit a workbook. Create a calculation and select the functions, your custom functions will be under database functions. Conditions are on the condition tab.
    Rod West

  • How to write a java function for use in where clause in SQL statement

    Hi,
    Does anyone know a good tutorial on how to write and include a Java class/function into Oracle.
    I'd like to write mathematical function to use in my queries, but the resources available in PL/SQL are very limited.
    Many thanx

    Pim,
    I see you got an answer in the PL/SQL forum.
    But in case you haven't seen it, perhaps this Web page will help:
    http://www.oracle.com/technology/tech/java/jsp/index.html
    Good Luck,
    Avi.

  • Can I print web pages from firefox using adobe pro 9 (Not using PDF download) and if so how

    Can I print web pages from Firefox 3.6.12 using adobe pro 9 (not using PDF Download) and if so how.

    {Ctrl + P} - do you have a PDF Printer listed in the Printer - Name drop-down?

  • Can I install Tiger on a G4 using Mac Pro or MacBook Pro install discs?

    I gave my old G4 dual500MHz processor running system 9.2.2 to my brother some time ago and he really wants to upgrade to tiger. I bought a copy of Tiger when it first came out but I have lost the disc. I currently have 3 macs and they're all intel machines so I don't have install discs on hand that are pre-intel. I would like to do a complete overhaul of the G4 but I am worried that the install discs I currently have might not work on it. I also have Disk Warrior and Drive Genius and plan to run them extensively on that machine as well. If not, can I start the G4 up as a target disc and do the install from my mac pro? Or is there a way to download a disc image of the older system and install it that way?

    If you bought a retail copy of Tiger & are not using it for another Mac, you do hold a Tiger OS license you could transfer to your brother legally. However, your brother still will need disks that install the PPC version of the OS for it to be installed on the G4, & for troubleshooting or some maintenance tasks. Intel-specific installer disks do not meet this requirement.
    If you can document your purchase (like if you have a receipt for it from an authorized Apple dealer or the proof-of-purchase certificates) you may be able to purchase a replacement disk through Applecare.

  • I bought Adobe Photoshop Elements 13 They sent me the one for Windows and I need the one for Macbook Pro!!!

    The download that adobe sent me is for Windows. I have a Mac and I need the one for Macbook Pro. I have been looking for a contact with customer service and even the chat is not working. Help please! I haven't use the product they sent me

    Please open link
    Contact Customer Care
    Then click on still need help, you will get the chat option

  • Can you capture video from the internet, using premiere pro cc?

    trying to capture video from the internet, using premiere pro cc, is that possible?
    also - it keeps saying "video capture offline" - any solutions for that?

    I am going to go out on a limb and say that while it may be against the YouTube terms of service to download or scrape a video off of their service, there are times that I really don't care since it is for my personal use. Providing myself or my wife with entertainment that she can watch or listen to on her smartphone while on an airplane, or in a car traveling down the road, just doesn't bother my moral compass. Doesn't make it twitch in the least.
    Perhaps I am wrong. Perhaps I shouldn't do it. Tough. I do, and will continue to do so until the Google police come knocking on my door.
    This is pretty much the same argument that they tried to kill the VCR with. The simple act of time shifting was something that was considered wrong, and illegal, until people came to their senses.
    As for the editing capability, you might be surprised at the ways it is possible to download video that works just fine for what I use it for. Premiere Pro has no problems allowing me to edit out the parts I don't like, or just aren't funny, and the quality really doesn't suffer much at all.
    Now, with the exception of something I did for my two year old Great Niece, I have never used any video that I have downloaded for anything except a tutorial, or in her case, a Sesame Street song I used when I shot video of me reading her the Sesame Street book that I purchased.
    Would it be wrong to post downloaded video, intact or edited, for public consumption? Sure it would. No question about it.
    But please do not assume that everyone downloading video from the Internet is doing so for nefarious purposes, and I promise not to assume everyone is a perfect angel and is following all the rules.

Maybe you are looking for

  • CUCM 8.6.2 - support IP Phone GXP2100 (Grandstream)

    Hi Guys, My Customer have the CUCM 8.6.2 and would like know if the IP phone model GXP2100 (SIP) is supported for this version. I search in the Cisco site and not found this information. Is there any documentation Cisco about this? Thanks, Wilson

  • IPhoto 9

    I'm getting the following error message when I try to open iPhoto's: "You can't open your current photo library using this version of iPhoto. You have made changes to your photo library using a newer version of iPhoto. Please quit and use the latest

  • Autonomous 1231/1242 Radius Config Help. What is this not working?

    Hey Guys, I can't seem to get the SSID RadiusTest to work properly. Windows PC's show "Windows was unable to find a certificate to log you into the network". Macs don't authenticate either. Radius server isn't seeing any requests at all. Radius serve

  • Upper/Lower case conversion

    Hi folks, Apart from the Infoobject General tab where an infoobject can be selected to allow Lower case letters, are there any other areas where this can be done? We need to allow this for a standard infoobject and thinking is that we can change this

  • Cross platform migeration

    actually i want to migerate data from oracle on unix platform to oracle on windows platform. does export and import will help me in this. i want to know that wheather the oracle maintains its own file format or it is platform dependent.If it maintain