Results 1 to 10 of 10
  1. #1
    Join Date
    Jan 2011
    Location
    Charleston, SC
    Posts
    12

    Unanswered: help writing a script

    I've written queries but never a SQL Script.
    Here is the deal
    I have one table SARAPPD that keeps tract of Record Activities. This is the multi value table. When a contact is initiated the code CC is put in the SARAPPD_APDC_CODE field.

    WHhen a payment is made another record with the code IE is entered into that same table.


    I can pull a query of all payments made agaist all students who don't have IE

    SELECT SARAPPD.SARAPPD_PIDM, TBRACCD.TBRACCD_EFFECTIVE_DATE
    FROM SARAPPD INNER JOIN TBRACCD ON SARAPPD.SARAPPD_PIDM = TBRACCD.TBRACCD_PIDM
    WHERE (((SARAPPD.SARAPPD_APDC_CODE) In ('CC','IE')))
    GROUP BY SARAPPD.SARAPPD_PIDM, TBRACCD.TBRACCD_DETAIL_CODE, TBRACCD.TBRACCD_EFFECTIVE_DATE
    HAVING (((TBRACCD.TBRACCD_DETAIL_CODE) In ('TDEP','TDES')) AND ((Count(*))=1))
    ORDER BY SARAPPD.SARAPPD_PIDM;

    but how to I use this to insert new records into the SARAPPD

    The fields to insert into the SARAPPD table would be
    SARAPPD_PIDM = same value
    SARAPPD_TERM_CODE_ENTRY = copy value from CC record
    SARAPPD_APPL_NO = copy value from CC record
    SARAPPD_APDC_Date=TBRACCD_EFFECTIVE_DATE
    SARAPPD.SARAPPD_APDC_CODE= IE

    I've done this sort of thing outside of the database
    but I'm wanting to create a script to so it,
    then perhaps a trigger to execute the script...but that part is later.

    all of this is kinds new to me

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    You have table & DDL. We don't
    You have data & DML. We don't.
    You have requirements. We don't.

    You have ALL the information & can't code a solution.
    Why do you expect others, who have NO details, to solve your mystery?
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Jan 2011
    Location
    Charleston, SC
    Posts
    12

    Trusenet and

    I was looking for pointers (not solutions_.. as I said
    I've never ever written a script inside a DB,
    lots of programs outside.

    A message..like check out this site on writing scripts would be helpful

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Ask Tom Home contains many fine coding examples.

    Consider actually READING the #1 STICKY post at the top of this forum for additional advice
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  5. #5
    Join Date
    Jan 2011
    Location
    Charleston, SC
    Posts
    12
    Quote Originally Posted by anacedent View Post
    Ask Tom Home contains many fine coding examples.

    Consider actually READING the #1 STICKY post at the top of this forum for additional advice
    That was a bit more helpful.
    I actually did a google search first...and it's like those Bing commercials.
    Which is why I asked Programmers who might have given some real tips.

    I was in Ask Tom earlier this week. I poke around someome..
    I'm new to the whole Oraclescene...having spent the last 15 years in the Microsoft Universe.

    just trying to get my feet

    and NO...I have NO Manuals.

  6. #6
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  7. #7
    Join Date
    Jan 2011
    Location
    Charleston, SC
    Posts
    12

    Manual

    I saw the link in the postit.
    and book marked it.

    Thanks for pointing it out.

    I was actually refering to the good old paper kind, so that I don't have to flip screens.

  8. #8
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    The last time Oracle shipped actual hardcopy manuals was last Century with the V8.0 release.
    FWIW - that Doc Set consumed about 12 linear feet of shelf space & weighed over 100 pounds.
    For V11 I'd guesstimate this Doc Set would be at least 3 TIMES larger!!
    For a while Oracle was selling documentation CDs, but I'm not that those are still available now.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  9. #9
    Join Date
    Jan 2011
    Location
    Charleston, SC
    Posts
    12

    Books

    But Oracle Programming Books are still available... I order some a few days ago.

    Thanks again

  10. #10
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    Read the concepts manual at the oracle link provided. That will give you a good grounding in how oracle works.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

Tags for this Thread

Posting Permissions

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