Hi Aneez,

The LIMIT syntax is not part of the SQL standard (yet at least...), and may as such be considered a MySQL dialect.

Derby does not support LIMIT, but we are working on implementing.the approach taken in the SQL standard using the ROW_NUMBER() function for the upcoming 10.4 release.You can find some more infromation on this exact topic at
  http://wiki.apache.org/db-derby/OLAPRowNumber

If you need to do this, I regret to say you need to do programatically in the java application as of Derby 10.3. This is also regrettably what happens when application programmers rely on non-portable SQL (or any other non-standard, non-portable functionallity for that matter).

There is a good comparison write-up of different databases and their support for similar functionallity here:
  http://troels.arvin.dk/db/rdbms/#select-limit

BR,
Thomas

Aneez Backer wrote:
Hi

The tables are being used for dynamic update and count of notification whenever a pre-defined change is made in any of the columns. Also, I had posted the trigger statement in a simplified form omitting data from it for which I knew I could work on myself.

Hope that answers your query.

Can you help me with one more transformation??

select * TABLEA where uid in (101,102,103) order by creation_time limit 5"

The problem here is with the 'limit 5' part of the query

Also, can you let me know of any online tutorial help available for learning Derby Query basics ??

Thanks
-aneez

*/"Bernt M. Johnsen" <[EMAIL PROTECTED]>/* wrote:

    Hi,

    >>>>>>>>>>>> Aneez Backer wrote (2007-11-21 20:05:01):
    > Thanks Bernt.
    >
    > That helped

    Just a small question: Is there some special (e.g. performance)
    requirements that force you to maintain the data in TABLEB? Since

    SELECT TAGCOUNT FROM TABLEB WHERE ID=xxx;

    should give the same result as

    SELECT COUNT(TAG_ID) FROM TABLEA WHERE TAG_ID=xxx;

    you could perhaps do without the triggers and TABLEB?
-- Bernt Marius Johnsen, Database Technology Group,
    Staff Engineer, Derby/Java DB
    Sun Microsystems, Trondheim, Norway





------------------------------------------------------------------------
Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See how. <http://us.rd.yahoo.com/evt=51732/*http://overview.mail.yahoo.com/>

Reply via email to