Select areaname, sum(int(mycode="code1"))"Code1",
sum(int(mycode="code2"))"Code2", ...
>From mybigtab
Group by areaname

Hope this helps
Spencer

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andrew
Tracey
Sent: Tuesday, August 15, 2006 11:51 AM
To: MapInfo-L@lists.directionsmag.com
Subject: [MI-L] SQL Querying

Dear All

I have a table containing 6000+ points which has a code of 1-12 associated
with each point, as well as a boundary table, I want to get a count of
points within each boundary dependant on code (1-12). This is easy to do but
I would like the results to be displayed in a table format e.g.: -

                Code1           Code2           Code3   etc
Area1           200             300             400

Area2           100             200             300

Area3           400             500             600

Etc

Does anyone know if this is possible?

Thanks in Advance
Andrew Tracey
Information Support Officer (GIS)
Information Team
Chief Executive Office
South Tyneside Council
Westoe Road
South Shields
NE33 2RL
 
Tel: 0191 4247561
E-Mail : [EMAIL PROTECTED]



_______________________________________________
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

Reply via email to