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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Use Data from 2 tables

Author  Topic 

swtnix
Starting Member

2 Posts

Posted - 2009-08-26 : 10:29:40
I've been banging my head on this one for awhile, so I hope someone can help.
I have 2 tables: tblRoster and tblTitle.
tblRoster has employee info; first and last name, unit, phone numbers, title(rank) and locations.
the tblTitle is a table used for filling combo box selection, but has the the rank in the correct order, lowest to highest.
What I need to do is display the columns from tblRoster with this criteria;
grouped by strCurStation and by strUnit and then ordered by tblTitle.strTitle.
Here is what I having been working with so far.

SELECT tblRoster.ID, strLastName, strFirstName, tblRoster.strTitle, tblTitle.strTitle, txtPhoneNum, txtCellNum, strUnit, strCurStation, strPermStation
FROM dbo.tblRoster INNER JOIN dbo.tblTitle ON tblRoster.strTitle = tblTitle.strTitle
ORDER BY strCurStation,strUnit

This will be used in a <cfquery> tag. Any help or direction would be greatly appreciated.

swtnix
Starting Member

2 Posts

Posted - 2009-08-26 : 14:00:50
Disregard. I figured it out.
thanks
Go to Top of Page
   

- Advertisement -