Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Sql > LIMIT and OFFSE...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 3378 of 3799
Post > Topic >>

LIMIT and OFFSET question

by MohsinHijazee <mohsinhijazee@[EMAIL PROTECTED] > Apr 1, 2008 at 12:31 AM

Consider  a query which returns a recorset by joining data from
multipel tables. In such a joined query, many rows sometimes
correspond to a single logical record. Consider the following result:

200	74	Name	        1200	Compiler, Principles, Tools and Technique
200	74	Name		1201	The Dragon Book
200	75	Description	1202	A comprehensive text on the compiler
construction
200	76	Published	46	1979-12-12 00:00:00
200	76	Published	47	2002-09-02 00:00:00
200	77	Pages		500	1289
200	78	Category	70	Science
200	78	Category	71	Computer Science
200	79	Email		1203	info@[EMAIL PROTECTED]
 Engieneering: A Practioners's Ap****ach
201	74	Name		1208	Pressman's Book
201	75	Description	1209	Detailed description on software engineering
practices
201	76	Published	48	1960-02-12 00:00:00
201	76	Published	49	1970-09-02 00:00:00
201	77	Pages	       	501	963
201	78	Category	72	Fiction
201	78	Category	73	Romance
201	78	Category	74	Poetry
201	79	Email		 1210	pressman@[EMAIL PROTECTED]
 we have more then 20 rows returned, in fact they are only TWO
logical records first with id 200 and second one with 201. If I apply
the limit and offset clauses to the query that generated this
recordset, they will limit the actual records returned instead of the
logical records. How can I control that the limit and offset is
applied to the logical records returned instead of physical records
returned?

Or is there any way to count the distinct items in first colum of this
recorset and limit the recordset according to them?
 




 1 Posts in Topic:
LIMIT and OFFSET question
MohsinHijazee <mohsinh  2008-04-01 00:31:05 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 21:44:44 CST 2008.