Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Query in Formula 1

Status
Not open for further replies.

cwsstins

MIS
Aug 10, 2004
412
US
Using CR 8.5 on Oracle 8.1 db. My table looks like this:

LoginID FullName Mgr
JONESB Bob Jones ROTHT
SMITHJ Joe Smith ROTHT
ROTHT Tim Roth KENTJ
KENTJ Jim Kent KENTJ

In my report, I'm grouping by FullName and trying to show each person's manager. But instead of showing the Mgr column, which is a loginID, I want to show the manager's FullName. Each manager is also a LoginID/FullName.

So in SQL, I would want something like this:

SELECT FullName FROM Tbl WHERE Mgr = LoginID

...or something along those lines. How can I create a formula that will basically do the same thing?
 
I would just add the table a second time and call it table_mgr. Then link it to the first table by linking {table.mgr} to {table_mgr.loginID}. Then you can just place {table_mgr.fullname} on your report for the manager's name.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top