My company uses only ColdFusion and SQL Server, so I'm learning new things, for example:
IIf(if_condition,true_result,false_result), but now in SQL Server I have to write
CASE source_value WHEN target_value THEN true_result ELSE false_result END
select str(3.1415927) as foowould return 3
Format(Now(),'yyyy-mm-dd')must now be written as
left(convert(varchar(12),getdate(),120),10)to get me the same output.
String & ' ' & Number & ' ' & Stringworks fine in Access, but in SQL Server it must be written as
string + ' ' + Cast(number as varchar) + ' ' + stringbut why the pluses if we don't even add anything, we're concatenating, right?
cfquerycauses all single quoted characters to be auto-escaped, by doubling them. Good in 90% of cases, but what if you are doing dynamic SQL think with interpolation of single-quoted values? Then that becomes a mess. You must now use tag in order to to be used in
PreserveSingleQuotes(sql)manner. This is not intuitive. I spent about an hour to find an answer.