V
16

Just ran my first SQL join and it took me 3 hours to get right

I've been messing with a little database for my book collection at home, and I finally tried to connect two tables using an inner join. Spent a whole evening chasing mismatched keys because I didn't notice one column had trailing spaces. Has anyone else hit a simple thing like that that threw you off for way longer than it should?
3 comments

Log in to join the discussion

Log In
3 Comments
evan543
evan5434d ago
Did you try trimming those columns before you joined them? That trailing space thing almost made me throw my laptop out the window once, I feel your pain.
7
williamw75
Tried debugging for three hours once. Realized a single space was the culprit. Almost became a laptop tosser myself that day.
8
ramirez.vera
Ngl, actually @evan543 I think trimming is overrated because catching those issues teaches you more.
2