InstantDB Project
About InstantDB
Project Mail Lists
Short History
Reporting Bugs
Screen Shots
3rd Party Examples
FAQs

Software
Downloads
Documentation
CVS Repositories
Roadmap
License

About Enhydra.org
Who We Are
News, Articles & Events
Getting Involved
Contact Us

Community
Demos
Contributions
Resources
Case Studies
On The Edge! -NEW-
Commercial Vendors


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: InstantDB: multiple returns for 'last_value' internal param


Joel

You need a WHERE clause in order to restrict the number of rows. 
Something like:

SELECT __IDB_INTERNAL last_value FROM TEXT('id') IN TABLE asUser_seq
FROM asUser_seq WHERE something=1

Unfortunately, there's a bug in the expression evaluator that results 
in there always being at least two rows returned unless you also add 
the row selector to the column selection (fixed in the next release).

SELECT something, __IDB_INTERNAL last_value FROM TEXT('id') IN TABLE 
asUser_seq
FROM asUser_seq WHERE something=1

Pete
----- Original Message -----
From: Joel Stevenson <atani@redfish.net>
Date: Monday, January 22, 2001 10:20 pm
Subject: InstantDB: multiple returns for 'last_value' internal param

> in trying to retrieve the 'last_value' internal param from a given 
> table with :
> 
> SELECT __IDB_INTERNAL last_value FROM TEXT('id') IN TABLE asUser_seq
> 
> I get a number of results equal to the number of records in the 
> table 
> returned.  They are all the correct 'last_value' number, but is 
> there 
> a way to simply get the value without the multiples?
> 
> P.S. -
> If I use DISTINCT, I get only one return, but on a table with a 
> large 
> number of entries, wouldn't this add a lot of overhead to the 
> procedure?
> 
> Thanks in advance.
> -------------------------------------------------------------------
> ----------
> To unsubscribe from this mailing list, send email to 
> majordomo@enhydra.orgwith the text "unsubscribe instantdb" in the 
> body of the email.
> If you have other questions regarding this mailing list, send 
> email to
> the list admin at owner-instantdb@enhydra.org.
> 

-----------------------------------------------------------------------------
To unsubscribe from this mailing list, send email to majordomo@enhydra.org
with the text "unsubscribe instantdb" in the body of the email.
If you have other questions regarding this mailing list, send email to
the list admin at owner-instantdb@enhydra.org.