Hi List,

The problem about opening views in MIPro is even more tricky than I expected.

I've been experimenting with "inner selects" in MIPro 6.5+MS/SQL 4.5 (both patched), 
and thought I had it licked.
I type in the query in the RDBMS open dialog's Expert entry to test whether a query 
works or not.

This test query works !

    SELECT cprnr,count(*) as antal FROM (
    SELECT cprnr,nummer from table1
    WHERE RIGHT(nummer,2) <> '99'
    GROUP BY cprnr,nummer
    ) rs1
    GROUP BY cprnr
    HAVING count(*) >= 2

It gives me the expected readonly MapInfo table.

However, when I tried to put it to some real work with the belov query, it DIDN'T work 
!!!

    SELECT cprnr,count(*) as antal FROM (
    SELECT cprnr,nummer from table1
    WHERE (nummer='0000-00000-00000-00' Or nummer='1111-11111-11111-11')
    GROUP BY cprnr,nummer
    ) rs1
    GROUP BY cprnr
    HAVING count(*) >= 2

Giving me the cryptic error message "Table not found" (or something similar, I'm using 
a Danish version).

Note that the queries are ALMOST IDENTICAL, except for the inner select's where clause 
!!!
And I'm opening both queries exactly the same way, with caching etc.

I simply fail to see why the former works while the latter doesn't.

HELP! Get some MapInfo developer online to discuss this subject, please !

Best regards / Med venlig hilsen
Lars V. Nielsen
Odense, Denmark
----- Original Message ----- 
From: Lars Nielsen <[EMAIL PROTECTED]>
To: Addison, Howard <[EMAIL PROTECTED]>
Cc: MAPINFO-L Mailinglist <[EMAIL PROTECTED]>
Sent: Friday, September 20, 2002 8:43 AM
Subject: Sv: MI-L Can't Open Union Queries from a access database in MapInfo 


> Hi Howy,
> 
> Probably the same reason why I can't open an "inner join" in MS/SQL directly in 
>MIPro.
> I.e.: SELECT * FROM table1 INNER JOIN table2 ON table1.ID = table2.ID
> 
> I thought, since MIPro consequently opens all views as readonly, that the mechanics 
>behind creating the view was irrelevant and thus transparent to MIPro, and as such, 
>all possibly view creation mechanisms were allowed. But apparently not ! It seems 
>that your Access/Union Query falls into the same category.
> 
> Maybe someone, perhaps at MapInfo, wishes to expand on the subject ?
> 
> Best regards / Med venlig hilsen
> Lars V. Nielsen
> Odense, Denmark
> ----- Original Message ----- 
> From: Addison, Howard <[EMAIL PROTECTED]>
> To: Mapinfo List (E-mail) <[EMAIL PROTECTED]>
> Sent: Friday, September 20, 2002 8:09 AM
> Subject: MI-L Can't Open Union Queries from a access database in MapInfo 
> 
> 
> > 
> > Hi All
> > 
> > Why is it so.......
> > 
> > I'm trying to open a Union Query as a DBMS Table in MapInfo (Version 7.0 -
> > Build 26) and I get the following error. 
> > 
> > ODBC Error: ODBC RC=-1, ODBC SQLState=07001, DBMS RC=-3010, DBMS
> > Msg=[Microsoft][ODBC Microsoft Access Driver] Tow few parameters. Expected
> > 1.. Unable to prepare table C:\qryTenementColours.TAB.
> > 
> > I can open normal tables and standard queries with no problems, but not a
> > union query.
> > 
> > WHY ???????????????
> > 
> > Any ideas
> > 
> > Many thanks
> > 
> > Howy
> > 
> > HOWARD ADDISON
> > CAD/GIS CO-ORDINATOR
> > AngloGold Australia Limited
> > Level 13, St Martins Tower
> > 44 St Georges Terrace
> > 
> > Telephone (08) 94254649
> > Fax (08) 94254663
> > <mailto:[EMAIL PROTECTED]>
> > 
> > 
> > 
> > _______________________________________________________________
> > 
> > This e-mail message contains confidential information which is
> > intended for the use of the person to whom it is addressed.  
> > If you received it in error, please notify the sender and 
> > delete the material from any computer.  Any disclosure, 
> > re-transmission, dissemination or any other use of this 
> > information is strictly prohibited.
> > _______________________________________________________________
> > 
> > 
> > ---------------------------------------------------------------------
> > List hosting provided by Directions Magazine | www.directionsmag.com |
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > Message number: 3155
> > 
> > 
> 
> 




Reply via email to