![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Programming A discussion forum for programs and programming used in tech-related businesses. |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Aug 2008
Posts: 2
OS: XP
|
SQL Statement Help Please
Hi all, I am creating a MySQL database and creating the database based around a DVD Company and just wondering if anyone could help me out with a little SQL statement problem I have (First time using MySQL).
I want to identify all DVDs that have scratch mark fault on them as well as the name of staff who wrote the fault report I created a table for the fault report table which is: FaultReport StaffName DateChecked FaultFound TypeofFault DVDName If anyone could help me out with this would be much appreciated. Thanks. |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#2 (permalink) |
|
Design Team Member
Join Date: Jul 2007
Location: Coventry, UK
Posts: 1,878
OS: Vista, various linux distros
|
Re: SQL Statement Help Please
Hey LauraQ,
As you haven't posted the values you use within the database i can only give you an idea of what the query should look like but: Code:
SELECT DVDName, StaffName FROM FaultReport WHERE TypeOfFault="scratch"; (notes) DVDName and StaffName would be displayed Type of fault would not but you could modify this to display it (of course scratch would be replaced with whatever notation you've used for a scratch mark)... What had you tried so far? Where were you slipping up? Cheers, Jamey |
|
|
|
|
|
#3 (permalink) |
|
Registered User
Join Date: Aug 2008
Posts: 2
OS: XP
|
Re: SQL Statement Help Please
Thats awesome thanks a lot for the help, much appreciated! From what you helped me with I tried to do a statement to product a list of job titles and salaries for all the staff working at the DVD company who began working after the 12th Of December 2001.. Not to sure how good the statement is though
![]() Select JobTitle, Salary FROM StaffInformation WHERE DateJoinedCompany > 12/12/2001 From table: StaffData StaffID Name HomeAddress Home Phone Number DOB Date Joined Company Job Title Salary |
|
|
|
![]() |
| Thread Tools | |
|
|