Solved

Correct SQL syntax

Posted on 2007-04-07
2
217 Views
Last Modified: 2010-03-19
I need the correct SQL syntax to find any records that contain a certain text.  For example, if table "customers" has a field "address", I would need the syntax to recover any record that has "800" in the address line.  One example result would be the address: 800 Main Street.
0
Comment
Question by:GDTRFBtoo
  • 2
2 Comments
 
LVL 42

Expert Comment

by:dqmq
ID: 18871014
Select * from customers where address like "%800%"
0
 
LVL 42

Accepted Solution

by:
dqmq earned 500 total points
ID: 18871020
Correction:
Select * from customers where address like '%800%'
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now