|I wonder if I can use '%' as below for LIKE command:|
declare X nvarchar
declare Y nvarcahr
where(X '%' like Y)-- <-this line is mentioned
|hey all I am using like command for accesing name as alphabetics |
I have written for that as
select * from tbl)country where country like " Textbox1.text " but it is not working properly please guide me
|### to manoj|
SELECT * FROM TABLE_NAME WHERE country like '%HERE_GOES_MASK%'
In that query, you should replace the TABLE_NAME with the name of the table you query data from. Also, HERE_GOES_MASK should be changed to the string you want to find
|@manoj - This is how your command should be:|
"Select * from tblcountry where country like '%" Textbox1.Text "%'"
you could also remove the "%" before the Textbox1.Text or remove it after, it will depend on your usage.
Hope this helps.
|How will i get names of all those people who have the string 'in' in their names?|
|I need to find a specific literal in an Oracle table column which is described as a |
"long" datatype. How do I do this, since "like" command can't be used on "long" type columns (can't use "long" column in a where clause of a select statement)? I get the error message:"inconsistent datatypes: expected NUMBER got LONG". Please help!
|I want to selet more than one row at a time ...I think query should be...|
SELECT * FROM TABLENAME WHERE FIELDNAME LIKE 'A%'
But it selecting only the first one ...I 'm working in MSAccess...with Core JAVA-Swing
Can u please help me SIR..........
select * from Table_Name where first_name like '%in%'
|Question PHP/SQL: I have an EXEC that take all my contact list from my Database and put them into a variable. Now I want to select all contact starting with "A" as the last name. And show them into my contact list. I want to do it with all letters "A" , "B" , "C" ... Something like Iphone Contact list , all familly name are in alphatical order. So, can I select and show all name starting by a specific letter? how? thx for answerying |
|Regalla Naresh Reddy||21-12-2009|
|Hi...! The information is useful. I need somehelp. |
I want to get the information like
SELECT * FROM employee WHERE name LIKE '%ram'
where '%ram' is the value of other table which is similar to the value in the current table.
Means i need to retrieve the information from the current table based up on the value of other table.
Can you help how to acheive this .....?
|select t1.field1,t1.field2,t2.field1.t2.field2 from t1,t2 where t1.keyfield=t2.keyfield and t2.name like '%Ram'|
Here t1 and t2 and two tables and linked by a keyfeild ( t1.keyfield=t2.keyfield)
Hi! Can I run two like in single command line. If Yes Tell me how
i want to find the Partucular Person name,
WHen i write Down in TextBox ..
|You can run two like commands by using AND or OR combinations. |
|how can i use like query to search for two words (statement) not only when word |
example : select # from table_name where column like'% hello world%'
|"SELECT * FROM video WHERE category LIKE '%'."$_GET['category']".'%' ORDER BY video_id DESC LIMIT ...... I have no idea where is the problem but it seems that this sql can not work with this statement because the webpage is not loading after this statement can someone tell me where is the problem I know that get[category] is funny or animal |
|Try by printing the SQL to see what the value of category you are getting. You can also print the error message to see what has gone wrong. |
|Like not working in vb 6....|
Me.Data1.RecordSource = "select * from phone where name LIKE '% " Me.Text1.Text "%'"
all >,<,>=,<=,and,or,between etc works correctly but like not working.....
what can i do?
|I want to check 4th digit of the account no is zero using sql query|
|I like to search a general one suppose not the Exact one for that what query is use for Eg|
SELECT * FROM [reg1] WHERE ([Name] LIKE '%' @Name '%' )
This will display the name what u search in database
I need the query for one are more search wht is that
|what if i would like to find person's name which contain 2 words only?|
I am having the table with the column First Name.
Where ever the first name contains 'is' I just wanted to remove these word in that record.
|HI all, I have 3 tables (A,B,C)and 2 querys in the first query I join two tables (A |
|hi, thanks for the submission of this since this has helped me a lot... i was confused with the usage of % and _. but now its clear for me... thanks again... hope i will be more benefitted in future from here|
|@ sf09 try combination of builtin functions like|
select name from tableName
where len(name) - len(replace(name,, ')) = 1
this will work for you
|hi, pls how do i write a query that should give me a result for all last_names that start with J, A and M?|
|Hi, can you please tell me how to retrieve names that are starting from either A or B from names table?|
|i want a query which will in output give the name of those employees whose last name ends with e and the query should be written without usibg the like statement |
|i want a query , how to find 3rd highest earner in a table|
i am trying to execute below stored procedure. i will take two arguments as a parameters.
ALTER PROCEDURE S_ListVendor
S_Vendor where @searchInField like @searchFieldValue;
its not executed so plz.. help me
|I want to print one field that should not start with the digits. How can i write that logic using the NOT LIKE keyword. or is there any otehr comand can we use. pls answer this question.|
|how to get the zero record table name in a database|
|I am trying to match first four digits(text)of a column values in a table with another table values(text). Pls write an sql query...|
|I want the list of studebts wgose ids are even...lik 2,4,6...pls help|
i want the name of the employees whose name starts with j or k or l or m...............what should be the query........plz help......
|Hello Every0ne: |
I Want To See The Third Letter In Name ..... In MySql Whos Could I ?
| have a column named Name.I want to make a query where i just enter initials of any name and i get the full name.Plz solve my problem.|
|Very simple and helpful.I have been benefited from here massively.Thanks a lot.|
what if i would like to find the data of a person having _ as 2nd letter in his name ex.s_sharma............... using wild cards
|Use locate command|
|Hi, If I have the second table like Student.Table but the First part of name or Second Part of name in the name field, Now guide how to compare both the table, My database is a huge one near about 1million record.|
|I am trying to find a string at the end of a field using %XYZ as my search criteria. How do I condition the LIKE operator not to consider trailing blanks? I saw some information on the strip BIF but am not familiar with it (novice using SQL).|
|Hi, I was create table with 3 columns and insert data, by using SELECT QUERY i get all the 3rd column data, from that i want particular column data. what can i do for that. if any body knows plz update.|
Thanks in advance.
|Hi, I was created one company based webapplication in that case i want to apply any one company that result wil be updated in my database and one vacancy will be reduced in my jsp page how can i do what query wil be use it please help me|
|how will i delete records whose name starts with a or j|
|how can i get a data from a table where it should be match with its username.|
something like this table:
table 1 (username,password,name)
all i want is when i type the username in a textbox and click a command button, the password will be on the other textbox that correspond to the username.
please write the php source code. thanks alot
|please refer a book in which all simple and useful sql queries are given, as u write in ur tutorials, and thanx its very beneficial |
|what is the code of to fetch data from mysql table according to alphabet|
|How to display the names that end with a particular letter in sql?|