Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / Informix Topics / August 2008

Tip: Looking for answers? Try searching our database.

How to sql question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ian - 18 Aug 2008 13:09 GMT
select sum((select count(*) from srv zt, z where  zt.some_id = z.sid
             union select count(*) from srv_arc yt, z where
yt.some_id = zsid))
 from  systables where tabid=1
#                                              ^
#  284: A subquery has returned not exactly one row.
#

Any suggestions on how to get this into the singleton select pls.

Its part of a huge support type corruption detction statement, so the
" into temp " is not an option.

Table z has a couple of integers as a list of jobs to investigate.
Art Kagel - 18 Aug 2008 13:18 GMT
select (select count(*) from srv zt, z where  zt.some_id = z.sid) + (select
count(*) from srv_arc yt, z where
yt.some_id = zsid)  as total
from systables where tabid = 1;

Art

> select sum((select count(*) from srv zt, z where  zt.some_id = z.sid
>              union select count(*) from srv_arc yt, z where
[quoted text clipped - 14 lines]
> Informix-list@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list

Signature

Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)

Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do those
opinions reflect those of other individuals affiliated with any entity with
which I am affiliated nor those of the entities themselves.

ian - 26 Aug 2008 13:30 GMT
Thanks Art
Talk about missing the bleedin obvious !
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.