>>>Hi All,
>>>
>>>how can i use this line Iif(Empty(thisform.txtID.Value),'.t.','CrsTable.ID=thisform.txtID.value') in T-Sql where clause?
>>>
>>>Thanks
>>
>>Solved myself :)
>>
>>WHERE vw_CrsStokhb.fiskodu = CASE WHEN @fiskodu is not null then @fiskodu ELSE vw_CrsStokhb.fiskodu END
>
>Please read this blog post
http://blogs.lessthandot.com/index.php/datamgmt/datadesign/do-you-use-column-param-or-param-is-null/ and blogs referenced in the comments to it.
A quick note: "Column = @Param OR @Param IS NULL" is not the same as "@Param IS NULL OR Column = @Param".
----------------------------------
António Tavares Lopes