Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

My Inner Join is not working!

Status
Not open for further replies.

marklenel

Technical User
Aug 29, 2003
46
GB
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.
 
Solved it myself - it was throwing some googlies in the way it was reading in the CHAR(15) data.

I need to read up on the data types it seems...
 
I'm glad you asked. It's an English colloquial, I'm afraid, derived from the beautiful game (sometimes referred to as 'chess on grass') that is cricket.

'Googlie' is a cricket term for a ball bowled with a wrist flip, but over the back of the hand. To the batsman it seems that it is going to spin one way when it hits the pitch (a regular "leg-break"), but in fact it spins the other way due to the flip-wrist action, offering an unexpected deflection off the bat that may be caught.

It's used in fairly regular parlance in England as a synonym for any unexpected results or outcomes - as per my dodgy use of the LOAD DATA INFILE command.

I guess the American equivalent might be a 'curve ball' or something similar?
 
'The pleasure is all mine' == 'You're welcome buddy' !!!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top