Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trend metrics does not support SQL server 2008 #2101

Closed
davidgabbay opened this issue Oct 31, 2019 · 1 comment
Closed

trend metrics does not support SQL server 2008 #2101

davidgabbay opened this issue Oct 31, 2019 · 1 comment

Comments

@davidgabbay
Copy link

when using Metrics with SQL server 2008 it wont work since 'FORMAT' is not recognized built-in function name at that version.

here is the error:
[2019-10-31 09:23:03] local.ERROR: SQLSTATE[42000]: [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]'FORMAT' is not a recognized built-in function name. (SQL: select FORMAT(DATEADD(hour, 2, [hen_date]), 'yyyy-MM-dd') as date_result, sum([ttl_withno]) as aggregate from [t_hen] where [hen_type] between 1 and 3 and [hen_date] between 2019-10-25 00:00:00.000 and 2019-10-31 09:23:03.753 group by FORMAT(DATEADD(hour, 2, [hen_date]), 'yyyy-MM-dd') order by [date_result] asc) {"userId":4,"exception":"[object] (Illuminate\Database\QueryException(code: 42000): SQLSTATE[42000]: [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]'FORMAT' is not a recognized built-in function name. (SQL: select FORMAT(DATEADD(hour, 2, [hen_date]), 'yyyy-MM-dd') as date_result, sum([ttl_withno]) as aggregate from [t_hen] where [hen_type] between 1 and 3 and [hen_date] between 2019-10-25 00:00:00.000 and 2019-10-31 09:23:03.753 group by FORMAT(DATEADD(hour, 2, [hen_date]), 'yyyy-MM-dd') order by [date_result] asc) at D:\Cxampp\htdocs\crmturtle\vendor\laravel\framework\src\Illuminate\Database\Connection.php:664, Doctrine\DBAL\Driver\PDOException(code: 42000): SQLSTATE[42000]: [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]'FORMAT' is not a recognized built-in function name. at D:\Cxampp\htdocs\crmturtle\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOStatement.php:119, PDOException(code: 42000): SQLSTATE[42000]: [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]'FORMAT' is not a recognized built-in function name. at D:\Cxampp\htdocs\crmturtle\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOStatement.php:117)
[stacktrace]
#0 D:\Cxampp\htdocs\crmturtle\vendor\laravel\framework\src\Illuminate\Database\Connection.php(624): Illuminate\Database\Connection->runQueryCallback('select FORMAT(D...', Array, Object(Closure))
#1 D:\Cxampp\htdocs\crmturtle\vendor\laravel\framework\src\Illuminate\Database\Connection.php(333): Illuminate\Database\Connection->run('select FORMAT(D...', Array, Object(Closure))
#2 D:\Cxampp\htdocs\crmturtle\vendor\laravel\framework\src\Illuminate\Database\Query\Builder.php(2130): Illuminate\Database\Connection->select('select FORMAT(D...', Array, true)
#3 D:\Cxampp\htdocs\crmturtle\vendor\laravel\framework\src\Illuminate\Database\Query\Builder.php(2118): Illuminate\Database\Query\Builder->runSelect()
#4 D:\Cxampp\htdocs\crmturtle\vendor\laravel\framework\src\Illuminate\Database\Query\Builder.php(2604): Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}()
#5 D:\Cxampp\htdocs\crmturtle\vendor\laravel\framework\src\Illuminate\Database\Query\Builder.php(2119): Illuminate\Database\Query\Builder->onceWithColumns(Array, Object(Closure))
#6 D:\Cxampp\htdocs\crmturtle\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Builder.php(521): Illuminate\Database\Query\Builder->get(Array)
#7 D:\Cxampp\htdocs\crmturtle\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Builder.php(505): Illuminate\Database\Eloquent\Builder->getModels(Array)
#8 D:\Cxampp\htdocs\crmturtle\

@jbrooksuk
Copy link
Member

Microsoft ended support for SQL Server 2008 in July 2014. We won't be supporting this version either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants