Thanks a lot. Tried it and it works like a charm. And thanks for the fast
> Not entirely sure what you are asking, but maybe the following:
>
> SELECT
> (SELECT Count(*) FROM tblImage WHERE tblImage.Approved= 1) as
> Image_Count
> , (SELECT Count(*) AS Cat_Count FROM tblImageCategory) as Category_Count
> , COUNT (*) as SubCategory_Count
> FROM
> tblImageSubCategory
>
>
> --
> Tom
>
> ----------------------------------------------------
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
>
www.pinnaclepublishing.com > .
> "Sven Pernils" <sven.pernils@bonetmail.com> wrote in message
> news:%23Q3oRag5EHA.1452@TK2MSFTNGP11.phx.gbl...
> Hi, Im new to this use group and this will be my first post.
>
> I have been running in to this problem, with counting the actual rows in
> three tables in the same query.
> Two tables I have managed to count from, but three is over my head. I have
> theese three tables:
>
> 1. Is the table with image blobs, No 2 holds image categories, and the
> third
> holds the sub-categories. Now I want to
> count the number of rows in all three tables, in one cuery to display the
> counters on one page header.
>
> So faar I have come to this:
>
> SELECT (SELECT Count(*) FROM tblImage WHERE tblImage.Approved= 1) AS
> Image_Count, Count(*) AS Cat_Count
> FROM tblImageCategory
>
> But, I have no clue how to squeese in the third table.
>
> Cheers,
> Sven
>
>