Posted on
10 Jul 2013 11:45 AM IST
In backend I have data like below :
sno pmname ----------------------- 101 101-12a-58
102 Murali Krishna
In front end if I entered 101 in textbox it will display the desired output as : 101-12a-58
If my data changes as below :
sno pmname ----------------------- 101 101-12-58
102 Murali Krishna
Now In front end if I entered 101 in textbox it will display the output as : 36 [JUNK VALUE] .
To overcome this we have to modify the query in Stored Procedure as :
SELECT char(39)+pmname+char(39) FROM tablename where pmname like '%'+@str+'%'
This small change fixes the issue.
|