Connecting two tables - What is the best approach?

Thanks for the support! I’m enjoying reading everyone’s posts. I’m learning something from each of them. When you’re passionate about what you do, arguing is normal. If it gets rough, I’m sure somebody has Jerry Springer on speed dial and I have a bag of popcorn in the cupboard. :smiley:

Seriously though, if this thread can help more people than myself, then keep it rolling.

I always use just a simple SQL client to work out my more complex SQL statements then put the final result into XOJO. This makes for MUCH quicker and more obvious debugging.

SQL lets you do things you would not normally think about until you begin to get fluent into some of the concepts like JOIN. Hey did you know you could JOIN a table to itself. Yep seemed weird to me too at first.

Pardon me if this is redundant in this thread since I only read parts of it.

+1 on using a separate SQL client. Writing one language (sql) within another language (xojo) is always difficult.

+1 on testing and creating your SQL code in a separate SQL client. When it works copy and paste it directly to Xojo.

For SQLite with tons of practical examples, look no further than “The SQL Guide to SQLite” by Rick F. van der Lans. Great book that covers so many areas in detail. I also have “Using SQLite” by Jay Kreibich, but I find it to be more about SQLite and its inner workings rather than SQL code that is for practical use.

+1

This is one of the few books that actually resides on my desk.