I've been tearing out my hair for a while—figuratively—trying to figure out how to put a parameter on a column where it is either null or, if the value of a cell is >0, equal to that cell.

In SQl Server (2008) I have a (numeric) column that allows for nulls, and I want to view those nulls in my query unless I specify a particular number otherwise in cell. I can't find a way to pass "Null" from a cell as a parameter, as it (presumably) sends it as text; I can't figure out a way to make a conditional IIF in MS Query either—e.g. IIF(?>0,?,Null) .

Does anyone have any ideas?