将数据类型varchar转换为float LARAVEL时出错

时间:2016-08-25 16:54:46

标签: php sql sql-server laravel eloquent

我收到以下错误:

SQLSTATE[42000]: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Error converting data type varchar to float. 

返回此原始数据库查询时?

DB::table('ORD_HEADER')
                ->join('ORD_DETAIL','ORD_DETAIL.OD_ORDER_NUMBER','=','ORD_HEADER.OH_ORDER_NUMBER')
                ->join('STK_STOCK','STK_STOCK.STKCODE','=','ORD_DETAIL.OD_STOCK_CODE')
                ->join('SL_ACCOUNTS','SL_ACCOUNTS.CU_ACC_CODE','=','ORD_HEADER.OH_ORDER_NUMBER')
                ->join('SL_ACCOUNTS2','SL_ACCOUNTS2.CUCODE2','=','SL_ACCOUNTS.CU_ACC_CODE')
                ->select('CUNAME')
                ->where('OH_PRIORITY',0)
                ->where('STK_SORT_KEY','PRODUCT')
                ->where('CU_USRCHAR1','<>','')
                ->groupBy('CUNAME')
                ->get();

任何人都可以看到我做错了吗?

0 个答案:

没有答案