So, I want to prepare a list for placement in combobox with laravel, and I wanted to use concatenate to join the value of 3 columns, and I can achieve this with
public function deviList() {
return Device::select(DB::raw('CONCAT(DESC, OS, OS_V) AS FullDesc'), 'DEVI_ID')
->where('STATUS', 2)
->orderBy('DESC')
->lists('FullDesc', 'DEVI_ID');
}
However, it would be better to have a space or a slash separating the values of the columns, so I did it the same way as some people recommended in some other places:
public function deviList() {
return Device::select(DB::raw('CONCAT(DESC," ",OS," ",OS_V) AS FullDesc'), 'DEVI_ID')
->where('STATUS', 2)
->orderBy('DESC')
->lists('FullDesc', 'DEVI_ID');
}
However, I get the SQLSTATE [42S22] error message : [Microsoft] [ODBC 11 driver for SQL Server] [SQL Server] Invalid column name '' (So I suppose, unlike the examples elsewhere, these partitions are read as if they were columns?) So, how can I concatenate with some sort of partition?