as far as i'm aware a JOIN requires the same fundamental data type, a WHERE
statement does not, so long as they're processed as the same data type.

confuserating i know, but a JOIN is interpreted slightly differently in SQL,
it is more of a hardcoded response where it can take advantage of existing
indices and such, but a WHERE statement is processor intensive, as it
performs an actual lookup function and data comparison.

these statements are not based on any factual evidence, just fabricated from
my endless ability to cause new and interesting errors in databases and a
so-called capacity for learning from mistakes, so they may be completely
false.

-----Original Message-----
From: Peter Brown [mailto:[EMAIL PROTECTED]
Sent: Monday, 28 July 2003 2:43 PM
To: [EMAIL PROTECTED]
Subject: MI-L SQL Select Join Problem


I am attempting to join two tables together (one mapinfo table and one
database table) based on a primary key of postcode.  On one table it is a
number, in the other table it is a string.  When trying to join the two
through SQL Select, the obvious error message appears "Datatype mismatch".
If I try and apply a conversion function as such:

PostcodeIncome.POA_CODE = Val(Postcodes.POSTCODE)
OR
Str$(PostcodeIncome.POA_CODE) = Postcodes.POSTCODE

then I get the other standard MapInfo error message "No join specified
between tables...".

I am aware that I can change datatypes in the database, but I really want to
know what MapInfo's capabilities are in relation this.  ie does MapInfo not
allow functions on the join expression, and if not, what are the standard
ways to resolve such an issue.  I'm sure this will come up again down the
track.  I intend to do a number of queries joining mapinfo geographic tables
to database statistical tables.  If anybody could point me to other
resources which will help me out, that would also be appreciated.

Thanks,

Peter



**********************************************************************
CONFIDENTIALITY NOTE:
This e-mail is intended only for the use of the individual or entity
named above and may contain information that is confidential and
privileged.  If you are not the intended recipient, you are hereby
notified that any distribution, copying or dissemination of this
e-mail is strictly prohibited.  If you have received this e-mail in
error or are not the named recipient, please notify us immediately
by return e-mail or telephone +61 3 8517 7777 and destroy
the original message.  Thank you
**********************************************************************


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 7791

---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 7792

Reply via email to