Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
slapper
Starting Member
6 Posts |
Posted - 2008-03-15 : 03:38:01
|
| To ask my question i will create an example. Table STAFF contains FIRSTNAME and LASTNAME and STAFF_ID.Table CLASS contains TIME and STAFF_IDQ: How do i perform a search on CLASS for a specific TIME, and display contents from STAFF, contents being FIRSTNAME AND LASTNAME only. Is it possible since both tables have STAFF_ID in common. |
|
|
slapper
Starting Member
6 Posts |
Posted - 2008-03-15 : 04:00:55
|
| The below statement is what im trying to execute but its error probed for a reason, surely what im trying to do is possible.select FIRSTNAME, LASTNAME from staff where STAFF_ID = STAFF_ID from class where TIME = 'value' |
 |
|
|
slapper
Starting Member
6 Posts |
Posted - 2008-03-15 : 04:36:57
|
| INGORE THIS POSTI figured it out through trial and error |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-03-15 : 05:13:35
|
quote: Originally posted by slapper INGORE THIS POSTI figured it out through trial and error
What is the solution?MadhivananFailing to plan is Planning to fail |
 |
|
|
slapper
Starting Member
6 Posts |
Posted - 2008-03-15 : 07:20:28
|
| Ah was very simple, but im all new to this, all i did wasselect staff.firstname, staff.lastname from staff, class, where class.time = 'create a value' and staff.staff_id = class.staff_id |
 |
|
|
|
|
|