Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to display MapInfo SQL rows from a Select Count(*) When the count is greater than 1

1,371 views
Skip to first unread message

re...@goldcoast.qld.gov.au

unread,
Sep 10, 2008, 9:00:16 PM9/10/08
to
Using the SQL Select function in MapInfo Professional ... I'm wanting
to display only those rows return from the statement
"Count(*),Unique_ID" ... In the Select Columns: box ... When the
resulting count is greater than 1 ... In the return browser.

Would anyone like to assist in what is required ... I was guessing a
statement in the Where Condiction: box ... Like [Count(*),Unique_ID >
"1"] ... But I getting the syntax error message "Variable or Field
Count not defined".

I'm just starting to learn ... But still need to learn a lot more ...
And self teaching from Google is never the easiest method at the best
of times ... But I’d like to feel that it's a good place to look for
HELP!

Uffe Kousgaard

unread,
Sep 11, 2008, 1:55:21 AM9/11/08
to
<re...@goldcoast.qld.gov.au> wrote in message
news:e8c826ef-6623-47f1...@n33g2000pri.googlegroups.com...

> Using the SQL Select function in MapInfo Professional ... I'm wanting
> to display only those rows return from the statement
> "Count(*),Unique_ID" ... In the Select Columns: box ... When the
> resulting count is greater than 1 ... In the return browser.

> Would anyone like to assist in what is required ... I was guessing a
> statement in the Where Condiction: box ... Like [Count(*),Unique_ID >
> "1"] ... But I getting the syntax error message "Variable or Field
> Count not defined".

You have to do it in 2 steps:

select field,count(*) from table group by field into tmp

select * from tmp where col2>1

> I'm just starting to learn ... But still need to learn a lot more ...
> And self teaching from Google is never the easiest method at the best
> of times ... But I'd like to feel that it's a good place to look for
> HELP!

Best place to ask:
http://groups.google.com/group/mapinfo-l?hl=en


re...@goldcoast.qld.gov.au

unread,
Sep 11, 2008, 6:00:07 PM9/11/08
to

G'Day Uffe,

Thanks for your quick response ... I've tried your suggestion ... LOL
& Behold ... It works ... Again ... Ta.

Just wish it could of been done in one execution.

HooRoo

Me

unread,
Sep 11, 2008, 6:37:19 PM9/11/08
to
> Thanks for your quick response ... I've tried your suggestion ... LOL
> & Behold ... It works ... Again ... Ta.
>
> Just wish it could of been done in one execution.
>
> HooRoo

Hi,

look as "SQL subquery" in google... you might find interesting info
(though I haven't used MapInfo in a while, though it might be impossible
to apply)

0 new messages