Syntax

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
 
D

Duane Hookom

Can't you include the balance column in the original crosstab as a Row
Heading?
 
H

HelpPLEASE

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top