What are the challenges you face when working across database platforms? Take the survey
Options

Formatting bug when using IIF

eugeneneugenen Posts: 6 Bronze 1
edited November 12, 2013 1:49PM in SQL Prompt
if you take the following statement, the spaces are intenional white spaces, and format it it does not format the IIF as nicely as the datediff
select 
	iif(     rrbr.ColumnName = 'Test',    0,       1), 
	datediff(       day,         getdate(),       getdate()    )
from 
	recon.ReconResultsByRow as rrbr

select 
	iif(
	rrbr.ColumnName = 'Test',    0,       1),
	datediff(day, getdate(), getdate())
from
	recon.ReconResultsByRow as rrbr

Comments

Sign In or Register to comment.