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

Equivalent of Sum(decode(...) in SQL for Access

Status
Not open for further replies.

nixon7

Programmer
Jun 10, 2005
2
US
I need get the results a sum-decode would give me in Oracle for a query I am doing in Access... can anyone help me? Does sum(iif...) work for this?
 
Just in case there are no Oracle experts in this Access forum, can you explain what you want to do.

 
You may consider the Nz function if decode was used only to handle Null.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Without getting into too much detail, I need my results to go "down" instead of "across" if that makes any sense.. the table is structured in oracle to work of a an excel spreadsheet.. so the data has a row and column with a line number so i need a sum(decode) to get the results like this:

account date Contracts
9999 08/19/2005 200
8888 08/20/2005 500
 
The Switch function in Access works off of pairs similiar to the decode with the last unpaired value being the default. Look up Switch in Help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top