Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2013
    Posts
    3

    Question Unanswered: SQL Developer help

    Hey guys

    I need some simple help, I hope it is any way. I am just learning how to write scripts and I am having a problem. I need to:

    List the email addresses, first names, and last names for all clients who have email addresses ending in “edu”. Put the list in order of email address.

    This is what I have in SQL Developer:

    SELECT Email,FirstName,LastName
    FROM CLIENT
    WHERE Email LIKE '%edu'
    ORDER BY Email;

    The problem is when I run the script, I get nothing but the column names, no data returns. The data is there, I checked the tables.

    Everything has run fine, I just can't get the data to come back and can't figure out why!!!!

    This is my first time here, I hope I posted in the correct section.

    Thanks for your help!!

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool

    Should work, post client table definition and sample data.
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Apr 2013
    Posts
    3
    CREATE TABLE CLIENT(
    ClientID integer not null,
    LastName char(10) not null,
    FirstName char(10) not null,
    Phone varchar(13),
    Email char(10),
    CONSTRAINT client_pk PRIMARY KEY (ClientID)
    );


    ClientID LastName FirstName Phone Email
    105 Frost Tere 704-555-2236 mtfrost@yahoo.com

    106 Perotti Jim 704-995-8899 perotti@ohio.edu

    110 Thacker Rebecca 980-555-1212 thacker@ohio.edu

  4. #4
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool

    Quote Originally Posted by FaithL2B View Post
    CREATE TABLE CLIENT(
    ClientID integer not null,
    LastName char(10) not null,
    FirstName char(10) not null,
    Phone varchar(13),
    Email char(10),
    CONSTRAINT client_pk PRIMARY KEY (ClientID)
    );


    ClientID LastName FirstName Phone Email
    105 Frost Tere 704-555-2236 mtfrost@yahoo.com

    106 Perotti Jim 704-995-8899 perotti@ohio.edu

    110 Thacker Rebecca 980-555-1212 thacker@ohio.edu
    Something is wrong, none of the e-mail in the data you posted will fit within a column of CHAR(10) length.
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  5. #5
    Join Date
    Apr 2013
    Posts
    3
    I saw that after I posted here and changed it. However, that did not fix the problem. So, thank you for rolling your eyes at me, but my problem still stands.

  6. #6
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool

    Quote Originally Posted by FaithL2B View Post
    I saw that after I posted here and changed it. However, that did not fix the problem. So, thank you for rolling your eyes at me, but my problem still stands.
    What is wrong is your table definition, change all CHAR() columns to VARCHAR2() and remove the trailing spaces from all data.
    This will fix it!
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •