stored procedure help Please.....# Database - 数据库
j*l
1 楼
I have the following sql command needs to transfer to stored procedure:
select * from book where title " + sTtile + " and author " + sAuthor + " and
date " + sDate;
sTitle and the other three are string. sTitle could be 'is not null' or "like
'%' + @Title +'%' ". It's the same thing for sAuthor and sDate.
I tried to write stored procedue of
... where title @title and author @author and date @date
but it failed.
The purpose of this query is to execute multiple-parameter query.
Your help or sugges
select * from book where title " + sTtile + " and author " + sAuthor + " and
date " + sDate;
sTitle and the other three are string. sTitle could be 'is not null' or "like
'%' + @Title +'%' ". It's the same thing for sAuthor and sDate.
I tried to write stored procedue of
... where title @title and author @author and date @date
but it failed.
The purpose of this query is to execute multiple-parameter query.
Your help or sugges