sql指令錯誤:select * ,(case when convert(varchar,isnull(research1_e,''))='' Then isnull(research,'') Else research1_e End) AS research1 ,(case when convert(varchar,isnull(research1_c,''))='' then '' ELSE research1_c End) AS research2 ,(case when title_code Is Not NULL Then dbo.fn_code('title',title_code) Else dbo.fn_code('title',title_code) End) AS title2 , (case when title_code Is Not NULL Then UPPER(substring(dbo.fn_code_e('title',title_code),1,1))+LOWER(substring(dbo.fn_code_e('title',title_code),2,len(dbo.fn_code_e('title',title_code))-1)) Else UPPER(substring(dbo.fn_code_e('title',title_code),1,1))+LOWER(substring(dbo.fn_code_e('title',title_code),2,len(dbo.fn_code_e('title',title_code))-1)) End) AS title2_e from apply where sn = 79680
ERROR [42000] [Microsoft][ODBC SQL Server Driver][SQL Server]傳遞到 LEFT 或 SUBSTRING 函數的參數長度無效。