Much as I am loathe to use these excellent forums for debugging, this is all that remains to prevent me from banging my head against the wall. I have two tables:-
CREATE TABLE Data_TestPacks
(TestPackID SMALLINT UNSIGNED,
PosterID CHAR(15));
CREATE TABLE Data_AllPosterData
(PosterID CHAR(15) NOT NULL PRIMARY KEY,
Format CHAR(2),
PSG SMALLINT UNSIGNED,
StationAreaID SMALLINT UNSIGNED,
AreaTypeID TINYINT UNSIGNED,
Visibility DECIMAL(4,3) UNSIGNED,
Invisibility DECIMAL(40,16));
and a simple select statement:-
SELECT
data_testpacks.TestPackID,
data_testpacks.PosterID,
data_allposterdata.PosterID
FROM data_allposterdata INNER JOIN data_testpacks
ON data_allposterdata.PosterID = data_testpacks.PosterID;
This select statement returns an empty set, and it shouldn't! I've checked the content of the tables, they seem fine. I've run the code in MSAccess and it works fine.
Am I missing a trick here? Is there any technical issue with using CHAR(15) as keys/indexes? (I realise that database purists would balk at the idea, but, hey, one step at a time!).
Thanks for any suggestions.
CREATE TABLE Data_TestPacks
(TestPackID SMALLINT UNSIGNED,
PosterID CHAR(15));
CREATE TABLE Data_AllPosterData
(PosterID CHAR(15) NOT NULL PRIMARY KEY,
Format CHAR(2),
PSG SMALLINT UNSIGNED,
StationAreaID SMALLINT UNSIGNED,
AreaTypeID TINYINT UNSIGNED,
Visibility DECIMAL(4,3) UNSIGNED,
Invisibility DECIMAL(40,16));
and a simple select statement:-
SELECT
data_testpacks.TestPackID,
data_testpacks.PosterID,
data_allposterdata.PosterID
FROM data_allposterdata INNER JOIN data_testpacks
ON data_allposterdata.PosterID = data_testpacks.PosterID;
This select statement returns an empty set, and it shouldn't! I've checked the content of the tables, they seem fine. I've run the code in MSAccess and it works fine.
Am I missing a trick here? Is there any technical issue with using CHAR(15) as keys/indexes? (I realise that database purists would balk at the idea, but, hey, one step at a time!).
Thanks for any suggestions.