Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2003
    Location
    India
    Posts
    3

    Unanswered: ROWTYPE Equivalent

    Hi I have one typical problem....

    I want something similar/ equivalent to 'rowtype' datatype that we have in ORACLE.

    -- Amit

  2. #2
    Join Date
    Nov 2003
    Location
    FRANCE
    Posts
    393

    Re: ROWTYPE Equivalent

    I think it's in the column definition of the table use
    IDENTITY 1
    I suppose it will add 1 to the last ID inserted

  3. #3
    Join Date
    Nov 2003
    Location
    FRANCE
    Posts
    393

    Re: ROWTYPE Equivalent

    What does RowType do ?

  4. #4
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Nop...No such luck...

    You have to know what you're dealing with ahead of time...

    ROWTYPE allows you to dynamically decalre your variables based on what you're accessing...way cool..but also cursor bound...

    but cursors don't work the same way everywhere...

    Oracle doesn't move data around...it gives you pointers to the data until you need it...

    A sample..

    Code:
      PROCEDURE DPND_BENEF_sp         (I_EMPLID            IN  ENR_DPND_BENEF.EMPLID%TYPE,         
                                       I_DEP_BENEF_TYPE    IN  ENR_DPND_BENEF.DEP_BENEF_TYPE%TYPE,
                                       I_DEP_BENEF_TYPE2   IN  ENR_DPND_BENEF.DEP_BENEF_TYPE%TYPE,
                                       DPND_BENEF_cur      IN OUT CurRefType)  IS
      BEGIN
    
       OPEN DPND_BENEF_cur FOR SELECT RELATIONSHIP
                                     ,BIRTHDATE
                                     ,STUDENT
                                     ,DEPENDENT_BENEF
    				 ,LASTUPDDTTM
    				 ,TRUNC((MONTHS_BETWEEN(TO_DATE('01-01-'||(TO_CHAR(SYSDATE,'YYYY')+1),'MM-DD-YYYY'),BIRTHDATE) / 12)) AS AGE
    				 ,DISABLED
    				 ,STUDENT_CERTIFY
                              FROM ENR_DPND_BENEF
                             WHERE EMPLID          = I_EMPLID 
                              AND DEP_BENEF_TYPE   IN (I_DEP_BENEF_TYPE,I_DEP_BENEF_TYPE2);
    
       EXCEPTION
         WHEN OTHERS THEN
    	         RAISE;
    
      END DPND_BENEF_sp;
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •