![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am trying to export data out of a table that contains text field types. Here is the SQL: SELECT 1, 2, First(3) as First_Date, Last(4) as Last_date, SUM(val([5])) as Sum_Qty FROM Results Group By 1, 2 Field 3 and 4 contain dates in the format date/time but are in a text datatype. I am trying to get the first day (from left) and the last day (from right) for those dates, as the table contains data for the month of January, so I am only interested from the 1st to 31st (or whatever). Furthermore, field5 contains a number that needs to get summed. I want the output grouped by 1 and 2. The above was experimented in Access2000, but this does not work in SQL2000 - as I am a learner!! Please can someone help me with the query above as I am stuck. SKC |
![]() |
| Thread Tools | |
| Display Modes | |
| |