By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,737 Members | 1,264 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,737 IT Pros & Developers. It's quick & easy.

How to? (Query)

P: n/a
I have table with following structure:

Cust Amount Type
1 150.00 1
1 100.00 2

I would like to get query result:

Cust Type1 Type2
1 150.00 0.00
1 0.00 100.00

How to do this with query?

Jun 5 '07 #1
Share this Question
Share on Google+
1 Reply

P: n/a

"Mirnes" <le*****@yahoo.comwrote in message
news:11**********************@n4g2000hsb.googlegro ups.com...
I have table with following structure:

Cust Amount Type
1 150.00 1
1 100.00 2

I would like to get query result:

Cust Type1 Type2
1 150.00 0.00
1 0.00 100.00

How to do this with query?
A cross tab would give you

Cust Type1 Type2
1 150.00 100.00

Other wise you could use IIF

iif([Type]=1,[Amount],0) iif([Type]=2,[Amount],0) .... for each
type
Jun 5 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.