Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2005

    Unanswered: interractive sql script

    hello, experts
    There's a table called seminars which tracks whether or not a certain seminar is being given on a given date.
    It's awkwardly defined, since seminars are defined as columns rather than rows, but I can't do much about that right now.

    Ok, so it has 9 columns called: date, seminar1, seminar2, seminar3, seminar4, seminar5, seminar6, seminar7, seminar8
    The availability is being tracked by using 0 to signify that seminar is being given on that date and 1 to signify that it's not.
    So, here's the DDL for this goofy table:

    create table seminars(
    day date,
    seminar1 number(1),
    seminar2 number(1),
    seminar3 number(1),
    seminar4 number(1),
    seminar5 number(1),
    seminar6 number(1),
    seminar7 number(1),
    seminar8 number(1));

    so a typical insert into that table would something like this:

    insert into seminars values

    This is what I need to be able to do. I'd want to come up with a little SQL or PL/SQL script that would prompt me for a date and the seminar number, and then report back to me whether or not that particular seminar is being given on that date, and if it's not given, I want it to tell me the next date that it's being given.

    Any pointers? I am quite comfortable with CRUD operations in sql, but have never written interractive scripts, and have not used PL/SQL.

  2. #2
    Join Date
    Aug 2003
    Where the Surf Meets the Turf @Del Mar, CA
    Provided Answers: 1
    >but have never written interractive scripts, and have not used PL/SQL
    FYI - PL/SQL is NOT interactive!
    Wrong tool for the job.
    Who is the instructor & what is the class?
    I suggest that you, RTFM
    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 2005
    thanks, that link was actually helpful for the other question I posted

Posting Permissions

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