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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal, SQL and using alias tables 1

Status
Not open for further replies.

paula

Technical User
Feb 23, 2001
18
GB
Bit of a long shot, this one!

I'm having problems getting the information I want from linked tables (knowhow/research database on a SQL server).

Table 1 holds most of the obvious record fields (e.g. item ID, title, date added, added by ID etc.). However, to get the full name of the person who added the item, I need to link from the 'AddedByID' in Table 1 to the 'UserID' field in Table 2 (which holds all the user info.). I can then drop the FullName field from Table 2, into my report.

Which was fine, until I realised I also needed a further name in my report - the creator name. Of course, if I create a second link from Table 1 to Table 2 (CreatorID to UserID) and try and pull the name out in the same way as before, there's no way of distinguishing which name I want!

I'd be grateful for any help at all - if you can understand the above, of course!

Thanks.
 
paula: All you have to do is include your Table2 a second time (call it Table3 as an alias) and then you will be able to join Table1.AddedByID to Table2.UserID and Table1.CreatorID to Table3.UserID David C. Monks
david.monks@chase-international.com
Accredited Crystal Decisions Enterprise Partner
 
Add Table #2 a second time to your report.
Use Database, Add Database to Report menu option.
This will create an aliased copy of Table #2.

hth,
- Ido

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top