0
我得到了一個SQL查詢,我需要將它轉換成LINQ,這不是問題,但在這個特定的查詢中有幾個項目需要幫助,那些是選擇列名稱作爲'',也是連接。這是有問題的查詢:Linq SELECT AS和CONCAT
SELECT vessel_idx,
vessel_name,
spotlist_dp,
spotlist_bhp,
spotlist_deck,
spotlist_bp,
spotlist_oilrec,
spotlist_fifi,
spotlist_rov,
'' AS fixture_charterer,
'' AS fixture_work,
CONCAT(fixture_charterer ,
' ',
mid(fixture_start,9,2),
'/',
mid(fixture_start,6,2)) AS next_charterer_info,
'' AS fixture_location,
'0000-00-00 00:00:00' AS fixture_stop,
'' AS fixture_note
FROM tbl_vessels
WHERE vessel_type='AHTS'
AND current_location_spotlist_id = 2
AND fixture_start > '2016-02-12 08:30:00'
AND vessel_status = 'PPT'
ORDER BY fixture_stop
平常的東西一樣,並在等我可以對付它的purly這些部分我與掙扎。選擇列 '':
SELECT '' AS fixture_charterer,
'' AS fixture_work,
和concatination
CONCAT(fixture_charterer ,
' ',
mid(fixture_start,9,2),
'/',
mid(fixture_start,6,2)) AS next_charterer_info,
'' AS fixture_location,
'0000-00-00 00:00:00' AS fixture_stop,
'' AS fixture_note
非常感謝
爲什麼你用它掙扎?你的嘗試是什麼? –