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
非常感谢
为什么你用它挣扎?你的尝试是什么? –