Results 1 to 2 of 2

Thread: SQL statement needs to return all fields

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    1

    Question

    For a Crystal Reports crosstab report,
    I have a SQL statement joining three tables :
    reasons, calltype, models.

    In the report, models are the columns;
    reasons grouped by calltype are the rows.

    I'm counting the number of calls for each reason in each calltype for each model.

    My results include those models and reasons that had calls (1 or more). I need the columns (models) and rows (reasons) that did not receive any calls (0) on the report too.

    Any ideas? Please help.

    The SQL has evolved into the monster below:

    select tblCallCategory.Category,
    tblCallReasons.Reason,
    /*tblCustModels.ModelNum,*/
    tblModelCategory.CategoryDescr,
    count (*) as Callcount


    from (((tblCallReasons
    join
    tblCustEvents
    on tblCustEvents.CallReasonId = tblCallReasons.CallReasonId)
    join tblCallCategory
    on tblCallReasons.CallCategId = tblCallCategory.CallCategId)
    join tblCustModels
    on tblCustEvents.CustModelId = tblCustModels.CustModelId)
    join tblModels
    on tblCustModels.ModelNum = tblModels.ModelNum
    full outer join tblModelCategory
    on tblModels.ModelCategId = tblModelCategory.ModelCategId




    [Edited by jenj on 08-15-2000 at 04:19 PM]

  2. #2
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105
    What does your Join look like?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width