Sqlserver
 sql >> Database >  >> RDS >> Sqlserver

Come utilizzare TO_Char() in SQL Server 2008

TO_CHAR è Oracle. In SQL Server, usa CONVERT :

SELECT C_Debt_Payment.AD_Client_ID,  
  (CASE WHEN C_Debt_Payment.AD_Client_ID IS NULL THEN '' ELSE COALESCE(CONVERT(varchar(20),table1.name),'') END) AS AD_Client_IDR