[V4MD] Max aggregate function in director

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Aug 24 21:14:52 CDT 2004


On 8/24/04 9:05 PM, "Daniel Crowder" <daniel at monumental-i.com> wrote:

Hi Daniel,

> I think I've narrowed down the issue I was having. It has to do with
> getting a RecID from the table. Basically, all I am trying to do is pull
> the record with the highest number RecID.
> 
> 'select max(category_ptr) from product'
> returns: [[#max: 130]]
> 
> 'select max(RecID) from product'
> returns: []
> 
> Any suggestions?

I think problem in RecID field.


Workaround is:
    create BaseObject method of ULONG type with simple formula
        "ReCID"

    i.e. This BaseObject method will have the same value.

Try apply MAX to this BaseObject method.

-------
Also note that the fastest way to get what you need is

        Table.GertPhysicalRecordCount()

But V4MD 1.x do not have such function.

V4MD 2.0 will have it



>> I hope I am doing something obvioulsy wrong.
>> 
>> I am trying to pull the record with the highest record id:
>> 
>>  set query = "*select catalogid, max(RecID) from product*"
>>  set dbCursor = new( xtra "VCursor", GetRef(p_db.db),query)
>>  change = GetRecordsAsPropList(dbCursor)
>>  dbCursor=VOID
>> 
>> The change variable (which is the prop-list with the returned records)
>> returns as an empty list. I'm pulling my hair out! I tried to test
>> this interactively but visql crashes with whenever MAX is invoked.
>> 
>> Any suggestions appreciated!

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list