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 foo
would 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 & ' ' & String
works fine in Access, but in SQL Server it must be written as
string + ' ' + Cast(number as varchar) + ' ' + string
but why the pluses if we don't even add anything, we're concatenating, right?
cfquery
causes 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.
Re:SQL Server docs
avik on 2005-01-28T19:11:54
Exactly! "Cool, yet proprietary" things are one programmer's bread and butter, but another programmer's headache and tears.