RE: Query formulation question
On 04-Apr-2003 [EMAIL PROTECTED] wrote: Hi there, I have some experience with SQL, but I'm drawing a blank on this one. I have a table with these fields: Location Unit StartDate StopDate I want to construct a SELECT statement to get to a report that looks something like this: Location1Location2 Location3 ... Date1 count of units where Datex is between Date2 StartDate and StopDate ... Date3 ... Where Date1, Date2, etc are a week apart within a given date range. Any help appreciated. A HREF=http://www.devshed.com/Server_Side/MySQL/MySQLWiz/page1.html; Cross-tabulationA Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Query formulation question
Hi there, I have some experience with SQL, but I'm drawing a blank on this one. I have a table with these fields: Location Unit StartDate StopDate I want to construct a SELECT statement to get to a report that looks something like this: Location1Location2 Location3 ... Date1 count of units where Datex is between Date2 StartDate and StopDate ... Date3 ... Where Date1, Date2, etc are a week apart within a given date range. Any help appreciated. -Bob -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Query formulation question
This is quite complicated with SQL. However, Microsoft Excel has excellent tools for creating crosstabs exactly like this. -ms -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, April 04, 2003 9:56 AM To: [EMAIL PROTECTED] Subject: Query formulation question Hi there, I have some experience with SQL, but I'm drawing a blank on this one. I have a table with these fields: Location Unit StartDate StopDate I want to construct a SELECT statement to get to a report that looks something like this: Location1Location2 Location3 ... Date1 count of units where Datex is between Date2 StartDate and StopDate ... Date3 ... Where Date1, Date2, etc are a week apart within a given date range. Any help appreciated. -Bob -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Query formulation question
Here's a link to an article that discusses how to set up cross-tab queries. http://www.devshed.com/Server_Side/MySQL/MySQLWiz/page1.html -Original Message- From: Michael Shulman [mailto:[EMAIL PROTECTED] Sent: Friday, April 04, 2003 12:08 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Query formulation question This is quite complicated with SQL. However, Microsoft Excel has excellent tools for creating crosstabs exactly like this. -ms -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, April 04, 2003 9:56 AM To: [EMAIL PROTECTED] Subject: Query formulation question Hi there, I have some experience with SQL, but I'm drawing a blank on this one. I have a table with these fields: Location Unit StartDate StopDate I want to construct a SELECT statement to get to a report that looks something like this: Location1Location2 Location3 ... Date1 count of units where Datex is between Date2 StartDate and StopDate ... Date3 ... Where Date1, Date2, etc are a week apart within a given date range. Any help appreciated. -Bob -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]