Syntax

  • Thread starter Thread starter HelpPLEASE
  • Start date Start date
H

HelpPLEASE

Is it possible to join a crosstab Query with a Select
Query in ONE SQL statement if so, what is the general
syntax, or is there a better way to approach this. So
example:

In a crosstab query I yeild Totals for Delinquencies per
Category and then I want to merge a Total Balance column
on it:

Cross Tab:

PORTFOLIO | 30days | 60days | 90days
-------------------------------------
AG | 500 | 230 | 45
CRE | 380 | 60 | 75
SBA | 900 | 190 | 125

Total Query:

PORTFOLIO | BANK BALANCE
------------------------
AG | 30000
CRE | 75000
SBA | 29000

FINAL RESULT "I WANT"

PORTFOLIO | 30days | 60days | 90days | BANK BALANCE
 
Not that I know how, I only have one Balance column, the
values for the delinquencies come from that column, but
not all rows are delinquent so how do I use the balance
column for two different purposes? if I include balance in
a row heading, it only adds those rows for for
delinquencies so I get something like:

PORTFOLIO | 30days | 60days | 90days | BANK BALANCE
 
Back
Top