On Wed, May 28, 2008 at 11:15 PM, beejayzed <[EMAIL PROTECTED]> wrote:
> > I have two tables, one which has each visit(call) on a house logged, > another > which has each letter sent to a house logged. > I would like to create a query which has two columns, Letters.Date and > Calls.Date, for a specific HouseID. > > So how do I get the desired result? > This would be: > 26/5/08 15/5/08 > 27/5/08 15/5/08 > 28/5/08 15/5/08 > 16/5/08 > > Before anything else: Use ISO date formats, e.g. 2008-05-26 instead of 26/5/08. Not only is it reasonably unambiguous (e.g. to me, 12/5/08 is December 5th), but when you sort them as strings they also sort in date/time order. Secondly, glancing over your request, it seems that you have confused a database table with the generic tabular data layout you might achieve using e.g. HTML. Each row of a table AKA 'relation' contains related information. What you seem to want, however, is completely different: You seem to actually want two *different* sets of data, that have nothing to do with each other, and display them in columns side-by-side. The proper way to do this is to have your application pull back all of the letter dates in one query, then all of the visit dates in a second query, and then piece them together for display purposes outside of SQL. -- -- Stevie-O Real programmers use COPY CON PROGRAM.EXE _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users