> Hello, > > > I have hug postgresql database and when i going to search for a query > with database retrieve with limit of 669 is allow > > If my query fetch records more over 669 records then error is comming... > > > RROR: more than one row returned by a subquery used as an expression > > ********** Error ********** > > ERROR: more than one row returned by a subquery used as an expression > SQL state: 21000 > > > What should I have to do.????? > > > Its urgent .... Fix it. The 'bug' is actually your falt - you're using a subselect in the place where an expression is expected, and the subselect returns more than one row (which is causing the problem). See for example this: SELECT * FROM employees WHERE name = (SELECT name FROM ...) if the subselect returns more than one row, what should the database do? The only reasonable solution is to throw an error. The same holds for subselects used instead of columns, i.e. SELECT name, (SELECT ... FROM ...) FROM employees So you have to find the subselect that returns more than one row and fix it (rewrite it or something). regards Tomas -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general