I have this statement inside a stored procedure (SQL 6.5 VB6 client using ADO through ODBC)
I know it's not legal to assign a querey that returns multiple values to a variable but in this case the set rowcount 1 should take care of that, shouldn't it? I'm getting an error returned 'subquerey returned more than one value' but i can't tell where the error is happening because debugging of SP's in 6.5 really, really sucks.
TIA
Ruairi
Could your manufacturing facility benefit from real time process monitoring? Would you like your employees to be able to see up to the minute goal and actual production?
For innovative, low cost solutions check out my website.
Code:
set rowcount 1
-- begin search, normal log
select @tsortsrec = @logssortsrec
--Added 5/30/2001
-- skip the grade-incrementing search if there is no price with this species, sort, vbd, contractor, length
select @lenforanygrade = (select rec from lendiamlen where vbdpricerec = @vbdpricerec and
contractortyperec = @tcontractortyperec and
speciesrec = @speciesrec and
sortsrec = @tsortsrec and
length1 <= @len and
length2 >= @len)
TIA
Ruairi
Could your manufacturing facility benefit from real time process monitoring? Would you like your employees to be able to see up to the minute goal and actual production?
For innovative, low cost solutions check out my website.