I am working on some software and I need some advice
I have the following SQL statment
I am getting the following error when I run the SQL command
SQLCommand = vbNullString
SQLCommand = SQLCommand & "SELECT DATECOL, TIMECOL, SUM(ITEMSOLD), SUM(TOTALSOLD) From TimeSales "
SQLCommand = SQLCommand & "WHERE DATECOL='" & ReportDate_Start & "' "
SQLCommand = SQLCommand & "GROUP By TIMECOL "
But as you can see I am using the group by clause can someone help me with this as I have spend ALL weekend on this ONE bit of code and it is starting to drive me insane
Run-time error '-2147467259 (800004005)':
[ODBC Firebird Driver][Firebird]Dynamic SQL Error
SQL error code =-104
Invalid expression in the select list (not contained in either an
aggregate funtion or the GROUP BY clause)