Less than or equal to query


#1

I have a set with following values

AcctMin AcctMax MaxWithdrawalLimit 1001 1999 1000 2000 2999 2000

There is another set in which I have stored customer account number.

I would like to get AcctMin and AcctMax for a given customer account number.

Select AcctMin, AcctMax from ReferenceSet where AcctMin <= CustomerAcctNum AND AcctMax >= CustomerAcctNum.

I am using C client library. Do I need to use UDF ? I noticed that only as_int_equals or as_range options are available but for a given customer account number AcctMin and AcctMax are unknown.


#2

Hi ,

Can anyone answer to this question. I am stuck at the same problem. And also, can I know if there is a limiting of records on select like normal SQL.


#3

See How to use Aggregation? for ideas. This problem is same as finding if my ip address falls withing a range of ip addresses and easily solved using udfs.