vendredi 6 décembre 2019

[SQL Server]Column 'retailers.id' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause

I am using laravel with mssql and getting this error with simple group by query. RetailersModel::groupBy('state')->get();

And it returns me error. I have migrating database server from mysql to mssql. Mysql is running fine but error occur when try to get record from ms-sql database server.

I have also set strict false in mysql and mssql config in database php.

Thanks in advance.

RetailersModel::groupBy('state')->get();


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire