vb.net - Convert linq statement to sql -
i deprecating project linq coding sql stored procedures. (my company refuses upgrade our sql 2000 database.) stuck on current code trying convert sql. can this?
dim icd9codes = ( in linq2db.icd9codes iif(string.isnullorempty(variable1), 1 = 1, a.code.startswith(variable1)) select a).tolist
i stuck on 'iif' statements converting 'where' clause uses if statement if value not null.
to convert sp you'll need make variable1
parameter. iif
part addressed in where
clause, this:
create procedure [procedure_name] @variable1 varchar(50) begin select * id9codes len(ltrim(rtrim(isnull(@variable1, '')))) = 0 or code @variable1 + '%' end
Comments
Post a Comment