frech@mwraaa.army.mil (Norman R. Frech CPLS) (05/15/91)
Kevin, I am having problems getting a cursor to return a date. A portion of my code as follows. *** cut here *** $lda = &ora_login("", "/", "") || die $ora_errstr; $csr = &ora_open($lda,"select asgmnt_no,last_name,sum(nvl(hours/8,0)),ssn from perstime where substr(asgmnt_no,1,1) != 'C' and type_time in ('1','2','3','4','5','6','7','R') group by asgmnt_no,last_name,ssn") || die $ora_errstr; while (($asgmnt_no, $last_name,$hours, $ssn) = &ora_fetch($csr)) { # HERE IS THE PROBLEM $select = 'select appr_date from audstaff'; #where ssn = \''.$ssn.'\' and asgmnt_no = \'C1999L\''; $subcsr = &ora_open($lda,$select) || die $ora_errstr; ($rdate) = &ora_fetch($subcsr) # HERE IS THE PROBLEM } do ora_close($subcsr) || die "can't close cursor"; print " $rdate \n"; # write; } do ora_close($csr) || die "can't close cursor"; do ora_logoff($lda) || die "can't log off Oracle"; *** cut here *** It seems as if the date returns a null even though I know a date is there. I have tried all different flavors of grabing this date field and none have worked so far. Text and numerics come back fine. Any suggestions? Norm Frech <frech@mwraaa.army.mil>