var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: IF statement in mssql 2005
From my reading around i notice that mssql 2005 does not use the If then Else as in programing.
I see they use CASE, but i am having trouble using it.
For example i want to run to compare 2 items and if they arent equal to each other a third item is null..... this is what my if structure on paper looks like
IF RSITEM.Itemid <> RSITEMDESCRIPTION.Itemid
RSITEMDSCRIPTION.ItemDesc = 'null'
I hope i am making sense.
Last edited by drdre; 08-09-11 at 17:42.
I gave an example of this in your previous post
ColumnName = Case when RSITEM.Itemid <> RSITEMDESCRIPTION.Itemid THEN NULL ELSE RSTITEMSCRITPION.ItemDesc END
Replace ColumnName with what you want to name the column
By the way, 'null' will not show a null column, it actually prints null
Thanks chris.. i now realize that after reading over the whole post.