Code:
If @ID_Number = N''
Begin
CASE
When @ID <> N'' Then (SELECT * FROM [NSC_SQL].[dbo].[fn_IDLookup] (@ID) Order By [ID],[CREATED_ON])
When @A_Number <> N'' Then (SELECT * FROM [NSC_SQL].[dbo].[fn_IDLookup] (@A_Number) Order By [ID],[CREATED_ON])
When @Reciept_Number <> N'' Then (SELECT * FROM [NSC_SQL].[dbo].[fn_IDLookup] (@Reciept_Number) Order By [ID],[CREATED_ON])
Else
Print N'Please enter a valid Number for the lookup.'
End
End;
Thanks
John Fuhrman