-
Hi
I'm trying with the an sql query get a recordset and
to return a name for ex
select name,adress,number1, number2 , number3
if numer1 + number2 > 0
begin
select 'BiggerthanZero' as ReturnName
end
else
begin
select 'LessThanZero' as ReturnName
end
FROM TableName
this doesn't work what im a doing wrong or is
it impossible to return a recordset and the 'ReturnName'
Micke
-
?
Q.
1. Your select, does it return more than 1 record?
do you expect it to?
In any case, you could return it as part of the recordset
select name, add,num1, num2, num1 + num2 as desiredfield
and check your recordset later one for desired field
if RS.fields("DesiredField") > 0 then
assuming RS is your recordset..
good luck