david@epsomdotcomdotau said:
That is to say, you can try (in Access 2000+), to index, join, or group,
but... Access will only use the first 255 characters
The difference between 'relational database' and 'SQL DBMS' is the
latter has features based on pragmatics.
One such decision in the Jet implementation is to limit certain
comparisons to 255 characters (max 510 bytes). Other products apply
limits e.g. SQL Server 2005 indexes are still limited to 900 bytes.
Another similar decision: if NULL = NULL does not return true, why do
NULLs group together in a GROUP BY? The answer is, because it makes the
most practical sense to work that way.
Also bear in mind we are talking about 'out of the box' limits. If we
need to go beyond these limits we can get creative. Here's an example
that works around the limit in a JOIN and a UNIQUE constraint to double
the limit from 255 to 510 (and could be extended further):
CREATE TABLE Test (
memo_col MEMO NOT NULL,
CONSTRAINT PK__Test
CHECK (1 =
(
SELECT COUNT(*)
FROM Test AS T2
WHERE
MID(Test.memo_col, 1, 255) = MID(T2.memo_col, 1, 255)
AND MID(Test.memo_col, 256, 510) = MID(T2.memo_col, 256, 510)
))
);
Which is enough to be dangerous.
I hope you are not suggesting that MEMO data (or UNION constructs or
NULLs etc) be 'verboten' just because of some limitations based on
pragmatics.
Some queries
will return rubbish random characters when you do.
Now this I must see! Please post how I can reproduce this. Thanks.
Jamie.
--