Re: Oracle Problem 1: Please Help

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • singhjih

    Re: Oracle Problem 1: Please Help


    The table looks like the following:


    Code
    -------------------

    INSTRUCTOR_ID(P K) NUMBER(8,0) NOT NULL
    SALUTATION VARCHAR2(5) NULL
    FIRST_NAME VARCHAR2(25) NULL
    LAST_NAME VARCHAR2(25) NULL
    STREET_ADDRESS VARCHAR2(50) NULL
    ZIP(FK) VARCHAR2(5) NOT NULL
    PHONE VARCHAR2(15)
    CREATED_BY VARCHAR(3)
    CREATED_DATE DATE NOT NUL
    -------------------


    I'm not fully capable to write PL/SQL I just started last week howeve
    I am a very compitent student. If I need to write a trigger could yo
    lead me in the right direction


    -
    singhji
    -----------------------------------------------------------------------
    Posted via http://www.webservertalk.co
    -----------------------------------------------------------------------
    View this thread: http://www.webservertalk.com/message173341.htm


  • Hans Forbrich

    #2
    Re: Oracle Problem 1: Please Help

    singhjih wrote:
    >
    The table looks like the following:
    >
    >
    Code:
    --------------------
    >
    INSTRUCTOR_ID(P K) NUMBER(8,0) NOT NULL
    SALUTATION VARCHAR2(5) NULL
    FIRST_NAME VARCHAR2(25) NULL
    LAST_NAME VARCHAR2(25) NULL
    STREET_ADDRESS VARCHAR2(50) NULL
    ZIP(FK) VARCHAR2(5) NOT NULL
    PHONE VARCHAR2(15)
    CREATED_BY VARCHAR(3)
    CREATED_DATE DATE NOT NULL
    --------------------
    >
    >
    I'm not fully capable to write PL/SQL I just started last week however
    I am a very compitent student. If I need to write a trigger could you
    lead me in the right direction.
    >
    >
    Oracle has a lot of good documentation on their site at
    http://docs.oracle.com. You should get familiar with the one called 'SQL
    Reference' for language and syntax, and the one called PLSQL Reference (I
    think) for general PLSQL.

    CREATE TRIGGER and PLSQL Anonymous block are some keywords.

    /Hans

    Comment

    • Dave

      #3
      Re: Oracle Problem 1: Please Help

      Hans Forbrich <forbrich@yahoo .netwrote in message news:<enBcc.755 9$Sh4.5308@edtn ps84>...
      singhjih wrote:
      >

      The table looks like the following:


      Code:
      --------------------

      INSTRUCTOR_ID(P K) NUMBER(8,0) NOT NULL
      SALUTATION VARCHAR2(5) NULL
      FIRST_NAME VARCHAR2(25) NULL
      LAST_NAME VARCHAR2(25) NULL
      STREET_ADDRESS VARCHAR2(50) NULL
      ZIP(FK) VARCHAR2(5) NOT NULL
      PHONE VARCHAR2(15)
      CREATED_BY VARCHAR(3)
      CREATED_DATE DATE NOT NULL
      --------------------


      I'm not fully capable to write PL/SQL I just started last week however
      I am a very compitent student. If I need to write a trigger could you
      lead me in the right direction.
      >
      Oracle has a lot of good documentation on their site at
      http://docs.oracle.com. You should get familiar with the one called 'SQL
      Reference' for language and syntax, and the one called PLSQL Reference (I
      think) for general PLSQL.
      >
      CREATE TRIGGER and PLSQL Anonymous block are some keywords.
      >
      /Hans
      Hans gives good advice. Check to doc, its quite complete. The key to
      the trigger is that you can reference the old and new values with
      syntax :new.<col_namea nd :old.<col_name. You can write PL/SQL code
      in the trigger that references the old and new value and thus create
      complex constraints.

      Suggestion. Instead of trying to solve your problem straight out. Try
      to create a very simple trigger to get familiar with the concept and
      to see it work. Then tackle your problem.

      Dave

      Comment

      Working...