2015-10-20 47 views
0

是結合在Telerik的radrotator(legand)日期綁定,system.byte在Telerik的radrotator(勒岡)日期system.byte

Dim mssQL=" case when a.log_type='Schedule' then" & _ 
      " (select case when e.schedule_type='Call Log' then cast(concat(d.user_firstname,' ',d.user_lastname,' ','Scheduled a Call On',' ',(DATE_FORMAT(e.schedule_date,'%d-%m-%Y'))) as char)" & _ 
      " when e.schedule_type='Meeting' then cast(concat(d.user_firstname,' ',d.user_lastname,' ','Scheduled a Meeting On', ' ',(DATE_FORMAT(e.schedule_date,'%d-%m-%Y'))) as char)" & _ 
      " when e.schedule_type='Mail Log' then cast (concat(d.user_firstname,' ',d.user_lastname,' ','Scheduled Mail On',' ',(DATE_FORMAT(e.schedule_date,'%d-%m-%Y'))) as char) end from crm_trn_tschedulelog e where e.log_gid=a.log_gid group by a.log_gid)" 

回答

0

問題是與你的CAST()concat()功能。 concat()將給你的結果爲system.byte當函數的輸入參數是不同的類型時,在這裏你串聯字符串和DATE Together。您還需要投射格式化日期並在Concat()之前刪除演員表。因此,您的查詢將如下所示:

concat(d.user_firstname,' ',d.user_lastname,' ','Scheduled Mail On',' ',cast (DATE_FORMAT(e.schedule_date,'%d-%m-%Y') as char))) 
相關問題