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

right outer join question

Status
Not open for further replies.

back2tek

Technical User
Jan 12, 2006
64
US
Hi all,
I am using CR9 and ODBC to pull data from 2 datasource (sql and sybase). I am pulling a weekly report for sales per agent per day. This table is on sybase.
The data looks like
Table A
Date Agent Sales
03/01 Mark F 210$
03/02 Mark F 570$
.....
03/07 Mark F 1200$
03/01 Tony S 320
03/02 Tony S 430
.....

Now I would like to link this table to another table (Table B) on the SQL that has a mapping ID for the agent.

Agent mapping_id
Mark F S0001
Tony S S0002

The Final report will be a list of all records on Table B
(Agent mapping_id) + Whatever Sales they made from table A...

In other words MARK F will appear 7 times from 03/01 to 03/07 whether he made a sale on these days or not..

When linking Table A to B ..I tried to select right outer but was dim

Any thoughts how this can be accomplished will be great..

Back2tek

 
The faster method woul be tolink the Sybase table tothe SQLServer database and report direcult against that, next would be to create an MSAccess dtabase and link (not import) both databases to it, then create an AccessQuery (orqueries) to provide the data you need for the report.

Within Crystal, create a Main report for the Agent data, and then use a linked subreport to supply the aggregates for the other table.

Slow but doable.

-k
 
Thank you synapsevampire,
Could you please elaborate a little on this
"Within Crystal, create a Main report for the Agent data, and then use a linked subreport to supply the aggregates for the other table."

I am afraid this will give me only days where agent had sales (from agent data) + their mapping id (from subreport mapping table)....What I need is actually the name/mapping listed for all days of week+ sales from agent data (for days where there is sales...

THank you for clarifying..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top