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

operator does not exist: ` character varying when using SQL-Server #69

Open
nexterid opened this issue Jun 30, 2021 · 1 comment
Open

Comments

@nexterid
Copy link

nexterid commented Jun 30, 2021

when using SQLServer throw this error

[Illuminate\Database\QueryException]
"SQLSTATE[42000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near '`'. (SQL: UPDATE ...

so I need to remove backtick symbol from vendor\mavinoo\laravel-batch\src\Batch.php

from

if ($driver == 'pgsql' )
$final[$field][] = 'WHEN ' . $index . ' = '' . $val[$index] . '' THEN ' . $value . ' ';


to

if ($driver == 'pgsql' || $driver == 'sqlsrv')
$final[$field][] = 'WHEN ' . $index . ' = '' . $val[$index] . '' THEN ' . $value . ' ';

@mavinoo
Copy link
Owner

mavinoo commented Jun 30, 2021

hi @nexterid
install version v2.2.9

disable backtick for driver pgsql & sqlsrv , commit: d3392a0

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