Re: [SQL] two records per row from query

2009-08-07 Thread John
On Friday 07 August 2009 02:50:48 am Leo Mannhart wrote: > John wrote: > [snip] > > > I'm sorry I was attempting to simplify the problem. I will attempt to > > provide more info: > > > > OVERVIEW: > > "mytable" contains the dates of the classes a student will attend along > > with fields to identi

Re: [SQL] two records per row from query

2009-08-07 Thread Leo Mannhart
John wrote: [snip] > > I'm sorry I was attempting to simplify the problem. I will attempt to > provide > more info: > > OVERVIEW: > "mytable" contains the dates of the classes a student will attend along with > fields to identify the student (not really it's normalized). One row per > clas

Re: [SQL] two records per row from query

2009-08-06 Thread John
On Thursday 06 August 2009 06:42:34 am Leo Mannhart wrote: > John wrote: > > mytable > > pkid > > class_date. > > sessionid > > > > select * from mytable > > 1 2009/01/01 2101 > > 2 2009/01/02 2101 > > > > I would like an SQL that would produce > > > > newtable > > pkid, > > class_date1, > > class_

Re: [SQL] two records per row from query

2009-08-06 Thread A. Kretschmer
In response to John : > Thanks - the sessionid's in fact do match. It's just that I can have more > than two (2) classes per sessionid. So mytable might look like: > select * from mytable > 1 2009/01/01 2101 > 2 2009/01/02 2101 > 3 2009/02/05 2101 > 4 2009/02/15 2101 > 5 2009/02/25 2101

Re: [SQL] two records per row from query

2009-08-06 Thread Leo Mannhart
John wrote: > mytable > pkid > class_date. > sessionid > > select * from mytable > 1 2009/01/01 2101 > 2 2009/01/02 2101 > > I would like an SQL that would produce > > newtable > pkid, > class_date1, > class_date2, > sessionid1, > sessionid2 > > Select * from newtable > > 1 2009/01/01 2009/01/

Re: [SQL] two records per row from query

2009-08-06 Thread John
On Wednesday 05 August 2009 10:21:08 pm A. Kretschmer wrote: > In response to John : > > mytable > > pkid > > class_date. > > sessionid > > > > select * from mytable > > 1 2009/01/01 2101 > > 2 2009/01/02 2101 > > > > I would like an SQL that would produce > > > > newtable > > pkid, > > class_date1

Re: [SQL] two records per row from query

2009-08-05 Thread A. Kretschmer
In response to John : > mytable > pkid > class_date. > sessionid > > select * from mytable > 1 2009/01/01 2101 > 2 2009/01/02 2101 > > I would like an SQL that would produce > > newtable > pkid, > class_date1, > class_date2, > sessionid1, > sessionid2 > > Select * from newtable > > 1 2009/01/0

[SQL] two records per row from query

2009-08-05 Thread John
mytable pkid class_date. sessionid select * from mytable 1 2009/01/01 2101 2 2009/01/02 2101 I would like an SQL that would produce newtable pkid, class_date1, class_date2, sessionid1, sessionid2 Select * from newtable 1 2009/01/01 2009/01/02 2101 2101 I have a list of classes that is perfect