if@OrderType!=0
begin
set@strTmp="<(selectmin"
set@strOrder="orderby["+@fldName+"]desc"
end
else
begin
set@strTmp=">(selectmax"
set@strOrder="orderby["+@fldName+"]asc"
end
if@OrderType!=0
begin
set@strTmp="<(selectmin"
set@strOrder="orderby["+@OrderfldName+"]desc"
end
else
begin
set@strTmp=">(selectmax"
set@strOrder="orderby["+@OrderfldName+"]asc"
end