huseyin Posted October 21, 2006 Share Posted October 21, 2006 hi to everbodyi am using aspx.net 2005 and sql 2000 db. i have some problem with queries that contain like % in the where clause.for example:select * from students where student_name like ' '"+txt_student_name.Text+"' %'if anybody knows the right format, can you help me !! (send me an example)or any source that i can have examples on like % queries will help thank you for ur replies Link to comment Share on other sites More sharing options...
aspnetguy Posted October 21, 2006 Share Posted October 21, 2006 http://www.1keydata.com/sql/sqllike.html Link to comment Share on other sites More sharing options...
Jonas Posted October 21, 2006 Share Posted October 21, 2006 aspx.net? Is that a different technology than asp.net? Link to comment Share on other sites More sharing options...
aspnetguy Posted October 23, 2006 Share Posted October 23, 2006 no, there is no such thing as aspx.net....he must have made a typo... Link to comment Share on other sites More sharing options...
Jonas Posted October 23, 2006 Share Posted October 23, 2006 Or he simply thought it was aspx.net, since the file extension is .aspx (typically at least, haven't heard of other endings). Link to comment Share on other sites More sharing options...
aspnetguy Posted October 23, 2006 Share Posted October 23, 2006 microsoft used the .mspx extension on their site (in some areas) I am not sure if that is just them being stupid and using their name int he extention...realistically I could use the .imcool extension as long as I map it in IIS. Link to comment Share on other sites More sharing options...
Jonas Posted October 23, 2006 Share Posted October 23, 2006 realistically I could use the .imcool extension as long as I map it in IIS.Yeah, you can do that on Apache too, like set it to parse .asp files for php. I'm sure you can add random file extensions as well... :)Would be cool to have a .leet extension. Link to comment Share on other sites More sharing options...
justsomeguy Posted October 23, 2006 Share Posted October 23, 2006 I prefer .wtf. For Web Template Files, of course. Link to comment Share on other sites More sharing options...
aspnetguy Posted October 23, 2006 Share Posted October 23, 2006 I prefer .wtf. For Web Template Files, of course.I am sure your customers (and mine too) wouldn't appreciate those extensions for their website tho But very funny! Link to comment Share on other sites More sharing options...
huseyin Posted October 25, 2006 Author Share Posted October 25, 2006 did anyone know why the query mentioned above doesnt work, i didint ask for aspx.net, asp.net or asdfasfdasf.net it doesnt matter what is it ? if you know please reply if you dont know continue sending about aspx, asp ,asdasdfasdfadsf thank you Link to comment Share on other sites More sharing options...
jesh Posted October 25, 2006 Share Posted October 25, 2006 The way you posted your sample code, if "txt_student_name.Text" is equal to "huseyin" then your query would look like this: select * from students where student_name like ' 'huseyin' %' It needs to be like: select * from students where student_name like 'huseyin%' or select * from students where student_name like '%huseyin' or select * from students where student_name like '%huseyin%' Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now