0

I have 2 table to join using full outer join. I'm using Laravel 8 and using MS SQL Server as database. Below are my code:

In Controller:

$second = DB::table('src_squeeze_height')->rightJoin('src_casting', 'src_casting.2D_CODE', '=', 'src_squeeze_height.2D-CODE')
$castsqzh = DB::table('src_casting')->leftJoin('src_squeeze_height', 'src_casting.2D_CODE', '=', 'src_squeeze_height.2D-CODE')->unionAll($castsqzh)->get();
return view('table.finalscan', ['castsqzh' => $castsqzh]);

This code return error:

syntax error, unexpected '$castsqzh' (T_VARIABLE)]

Where did I do wrong ?

user3783243
  • 5,368
  • 5
  • 22
  • 41

0 Answers0