space in-between search parameters
-
Hi all, I need a way out of this sql server querry. I have a database wich stores username with space in-between. the porblem am having is that when I run a search query using like operator it returns no value. e.g in my table I have a username stored their called "acod man" but i want to search by entering acod since i am using like operator I want it to locate "acod man" for me but it returns nothing select username from tbl_names where username like'%acod%' I will appreciate your responses. thanks in advance.
-
Hi all, I need a way out of this sql server querry. I have a database wich stores username with space in-between. the porblem am having is that when I run a search query using like operator it returns no value. e.g in my table I have a username stored their called "acod man" but i want to search by entering acod since i am using like operator I want it to locate "acod man" for me but it returns nothing select username from tbl_names where username like'%acod%' I will appreciate your responses. thanks in advance.
It should work perfectly. I dont see any reason for this query not working. I have tried a similar query as: select c1, c5 from t1 where c5 like 'R%' and this returns all the records for which c5 columns has values starting with 'R'. Juz try it again. Otherwise provide table records and structure... Letz see whats the probs??
Regards SG (sgg245@yahoo.co.in)
-
Hi all, I need a way out of this sql server querry. I have a database wich stores username with space in-between. the porblem am having is that when I run a search query using like operator it returns no value. e.g in my table I have a username stored their called "acod man" but i want to search by entering acod since i am using like operator I want it to locate "acod man" for me but it returns nothing select username from tbl_names where username like'%acod%' I will appreciate your responses. thanks in advance.
Tell me what is the type of column for which you are doing pattern-matching?? If the datatype of the column is nchar then it will return 0 records. Bcoz then its Unicode pattern - matching... :)
Regards SG (sgg245@yahoo.co.in)