Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2005
    Posts
    59
    Provided Answers: 1

    Angry Unanswered: Function that verify each individual field is blank!

    I am newbie in PL/SQL. I got a view that contain firstname, middlename, lastname, and class column fields having data on it. I need a PL/SQL function to check and verify the class column is blank or null values in this view. If so, just display the error: Class field is blank. Your time to code is much appreciated. Please help me with high priority. Thanks in advance.
    Last edited by avt2k6; 03-14-08 at 16:17. Reason: Make clear question

  2. #2
    Join Date
    Dec 2005
    Posts
    59
    Provided Answers: 1
    I posted my questions for a while. Some folks have viewed it, but no solution yet? I got some ideas how to check for validate a column name is blank by counting how many null or blank values of class column fieldname in that view and using IF condition to verify whether or not the class column fieldname is blank or null?, but I am new to PL/SQL syntax? Please help with actual code. Thanks.

  3. #3
    Join Date
    Mar 2007
    Posts
    623
    Yes, that seems reasonable. Just code it.
    For correct syntax, check the documentation found eg. online on http://tahiti.oracle.com/. Have a look into PL/SQL User's Guide and Reference. There are many useful examples there.

    Just for completeness, you did not post, what is the function supposed to return (datatype, value). Also requirement for displaying the error is not very common, it shall be the caller task (unless this is just a homework). You may use DBMS_OUTPUT, however be aware that the client (eg. JDBC) may not be able to display it. With this info, you will surely be able to complete the task.

  4. #4
    Join Date
    Dec 2005
    Posts
    59
    Provided Answers: 1

    Please simplify the problem!

    Hello all,

    I actually need the PL/SQL for counting how many null or blank value in class colunm fieldname. If that count is more than 0, the class is not blank or empty; otherwise it should be empty.

  5. #5
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >I am new to PL/SQL syntax
    So it is time for you to Read The Fine Manual below
    http://download.oracle.com/docs/cd/B...b14261/toc.htm
    to learn by solving this homework assignment yourself.
    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.

  6. #6
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Well, if you only need to count "how many records contain NULL in 'class' column", you don't need PL/SQL.

Posting Permissions

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