MYSQL Query Help

Posted on 2010-01-02
Last Modified: 2012-05-08
I need to get a SQL Query that I can execute to extract certain data.  Here are the details:

+ DB Type: MySQL
+ DB Name: adminDB
+ Table Name: licenseinfo
+ Field Name: LicenseNumber

So the data in the LicenseNumber Column looks like this: ( this is just a sample there are 300,000 Records)

SSCY -238-2W1-5F9
SSCY -378-0W5-5BD
SSCY -312-061-5PO
SSCF -323-0R2-5FW
SSCF -548-2U1-5OL
SSCF -332-0G5-5BY
SSCF -398-041-5PE

I need to extract all records that have SSCF in the LicenseNumber

I tried query builder in SQLYog but I was getting syntax errors.

Can Someone please write this query for me.

Question by:Ishana
    LVL 5

    Accepted Solution

    Try this

    SELECT * FROM licenseinfo WHERE LicenseNumber LIKE '%SSCF%'
    LVL 26

    Assisted Solution

    this will give you the records you are looking for

    SELECT *
    FROM licenseinfo
    WHERE LicenseNumber LIKE 'SSCF%'
    LVL 12

    Expert Comment

    Hi there;

    Above comments are true but could you give the error that you have got with SQLYOG so that I can reproduce here in my machine?

    Best regards.

    Author Closing Comment

    thanks it.!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
    CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    761 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

    8 Experts available now in Live!

    Get 1:1 Help Now