Help Please (SQL, ASP)

Results 1 to 2 of 2

Thread: Help Please (SQL, ASP)

  1. #1
    Join Date
    Dec 1969

    Default Help Please (SQL, ASP)

    I have two programs that print training reports. One does reports for the whole organization and the other limits it to a specific department. the department one works fine, but the other one doesn&#039;t I thought all I would have to do was change the SQL. This was a modification to include online classes in the calculation, so only the SQL was modified for the one i got to work. When I modified the report for the whole organization, I get an error that reads: Invalid use of Null: &#039;cDbl&#039; <BR><BR>The SQL for this report also runs correctly in SQL Plus so I dont think thats the problem. Thanks for any help you can provide. <BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Help Please (SQL, ASP)

    One of your numeric fields is returning a null value to the web page. The cDbl function cannot be used on nulls. You say you use SQL Plus, so I assume you&#039;re on an Oracle database, so an easy way to change this is to just change your sql query to include the NVL() function to replace any with zeros:<BR><BR>SELECT field1,<BR>NVL(field2, 0) AS field2<BR><BR>That will make any null values zeros and the cDbl function won&#039;t crash.<BR><BR>Hope that helps<BR>

Posting Permissions

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