Solved

SQL Statement Problem.

Posted on 2008-10-21
7
178 Views
Last Modified: 2012-05-05
Dear Expert,

I want to make a SQL statement to show the datas which is contain 'ab' but failed any one can help me?
Table Name: 123
Field Name: details

Select * from 123 where details LIKE '%ab%'

Am I correct ???
0
Comment
Question by:Rickyyy
  • 3
  • 2
  • 2
7 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 250 total points
ID: 22765625
this will work better:
sql server:
Select * from [123] where details LIKE '%ab%' 
ms access:
Select * from [123] where details LIKE '*ab*' 
MySQL:
Select * from `123` where details LIKE '%ab%' 
oracle:
Select * from "123" where details LIKE '%ab%'

Open in new window

0
 

Author Comment

by:Rickyyy
ID: 22765672
no record can found.....even have.....please help....
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 22765721
please clarify what database type you have, and what syntax you used.
are you SURE you connect to the right db?
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 13

Expert Comment

by:AielloJ
ID: 22765735
What database are you using?  This may seem obvious but I've made this error.  Have you verified the column with '%ab%' in it is the 'details' column?
0
 

Author Comment

by:Rickyyy
ID: 22769564
i am using Access (mdb). And I confirm there having %ab% in the details columns....
0
 
LVL 13

Expert Comment

by:AielloJ
ID: 22769689
Can you send the file?
0
 

Author Closing Comment

by:Rickyyy
ID: 31508190
The statement is work. Problem found which is come from the database problem.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction Hopefully the following mnemonic and, ultimately, the acronym it represents is common place to all those reading: Please Excuse My Dear Aunt Sally (PEMDAS). Briefly, though, PEMDAS is used to signify the order of operations (http://en.…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question