Dynamic limit for the number of records? - Mailing list pgsql-general

From Murali Mohan Kasetty
Subject Dynamic limit for the number of records?
Date
Msg-id 3D9EC259.38AC3D40@india.hp.com
Whole thread Raw
Responses Re: Dynamic limit for the number of records?  (Masaru Sugawara <rk73@sea.plala.or.jp>)
List pgsql-general
Hi all,

Is there a way to dynamically limit the number of records in a view
based on
the number of records in another table. Her e is an example:

I have two views VIEW1 and VIEW2.
The total number of records in VIEW1 and VIEW2 should be 20. So, if
VIEW1
has 10 records VIEW2 should have only 20 records, if VIEW1 has 5 records

then VIEW2 should have only 25 records.

I have tried LIMIT to limit the number of records. BUt, LIMIT requires
that
the number of recors be static. A
If somebody has faced this situation and knows of a solution, please let
me
know.

Best Regards
- Geetha
----------------------------------------------------
Hewlett Packard (India)
+91 80 2051382 (Phone)
847 1382 (HP Telnet)
----------------------------------------------------

Attachment

pgsql-general by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Boolean output format
Next
From: Martijn van Oosterhout
Date:
Subject: Server locale?