hi all.
for my gridview, i have a datasource and it includes an sql statement. i would like my sql statement to retrieve records by passing a query string.
this is my sql statement:
SELECT * FROM [mailer]
where subject LIKE '% '@s' %'
obviously i would like to retrieve the records based on the querystring, and if the records consist of that query string, it will be retrieved out.
however i got errors like: Incorrect syntax near '@s'.
i tried changing the statement to
where subject LIKE '% @s %'
where subject LIKE '% [@s] %'
but still it doesnt work.
please advise me. thanks in advance
for my gridview, i have a datasource and it includes an sql statement. i would like my sql statement to retrieve records by passing a query string.
this is my sql statement:
SELECT * FROM [mailer]
where subject LIKE '% '@s' %'
obviously i would like to retrieve the records based on the querystring, and if the records consist of that query string, it will be retrieved out.
however i got errors like: Incorrect syntax near '@s'.
i tried changing the statement to
where subject LIKE '% @s %'
where subject LIKE '% [@s] %'
but still it doesnt work.
please advise me. thanks in advance