3 Replies - 707 Views - Last Post: 14 October 2010 - 12:55 AM

#1 yalun  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 13-October 10

Need help with SQL database...

Posted 13 October 2010 - 10:07 PM

Alright, I'm not asking for anyone to do my homework, i just need some helping hands,

I didn't show up at class THIS ONE day, I always attend, and this one single day he gives out an assignment and gives some important information during class.. based on SQL databases, and I have no experience in this.
I've spent the past two hours searching for answers, trying SQL statements in the oracletest link he has provided, I've found online SQL cheat sheets (example http://www.sqltutori...cheetsheet.gif) with statements and all, have tried organizing them accordingly... i'm really getting frustrated now...

This is what the homework was, DO NOT DO IT FOR ME, I WANT TO LEARN THIS - so am looking for some help not the direct answers.

How exactly would I start this out? I try entering into the oracletest and it says things like "missing right parentheses", "invalid option" or some other error.. i cant even get past step one, let alone start on it. Do i start by creating a table? the course book isn't much help for this cause all it does is describe what SQL and oracle are...

""""
Use the SQL statements that we have shown in class as a model to create SQL commands to do the following tasks. Copy the commands into an RTF file and submit the RTF file with the following naming convention
FirstNameLastNameDatabaseLab.rtf
example WaldoWildcateDatabaseLab.rtf


You will be using a table called Customer from a database. You can access the database command window at the following link
http://faculty.cs.we...oracletest.aspx

1. List all entries in the Customer table

2. List only the first and last name of customers

3. List only first and last names in reverse order of last name (Z - A).

4. List first and last names of those from 'CO' (Note here that there is case sensitivity involved)

5. List the first and last name of those from the city of 'Littleton'

6. List the person whose customer number is "C9432910"

7. List those customers who have a balance greater than or equal to $500.00

8. List the address, city, state and zip of a customer whose first name is Harry
""""

Is it possibly because I need to write out the entire code into oh say, notepad, before entering it into the oracletester? Not just sql sentence by sentence.

Is This A Good Question/Topic? 0
  • +

Replies To: Need help with SQL database...

#2 smohd  Icon User is offline

  • Critical Section
  • member icon


Reputation: 1819
  • View blog
  • Posts: 4,627
  • Joined: 14-March 10

Re: Need help with SQL database...

Posted 13 October 2010 - 11:49 PM

Are these different questions? Means we have different SQL statements for them .! If this so then you need the knowledge of Select command, Order by command, where by command, like command. I think you can get all information about them if you go to Tutorial session or go to java2s.
If these links are not enough to your work show us another difficult which you get after that we will try to help> WE ARE HERE TO HELP EACH OTHER.

IF THIS POST IS HELPFUL TO YOU, PLEASE PUSH ME BY CLICKING TO + SIGN BELOW THIS POST. thanks
Was This Post Helpful? 1
  • +
  • -

#3 yalun  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 13-October 10

Re: Need help with SQL database...

Posted 14 October 2010 - 12:40 AM

Thanks! so does this sound about right?

1. This is a select all statement..should look something like this:
select * from Customers
2. this is wanting specific columns, so you I list them:
select fname, lname from Customers

3. I'll need ordering for this statement I think, using the 'order by' clause with desc or asc for descending or ascending order.
it'll look something like this i think:
select fname, lname from Customers order by lname desc

4. I would use a 'like' clause for this one right?
select fname, lname from Customers where State like 'CO'
(something like that, i might be wrong on the syntax)

5 and 6 are similar to previous ones..

7 just use something like this:
select fname, lname from Customers where balance >=500 (I might need single quotes, i cant remember, lol)

8 is similar to the others.
Was This Post Helpful? 0
  • +
  • -

#4 smohd  Icon User is offline

  • Critical Section
  • member icon


Reputation: 1819
  • View blog
  • Posts: 4,627
  • Joined: 14-March 10

Re: Need help with SQL database...

Posted 14 October 2010 - 12:55 AM

Oh yaa you have got it NICE!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1