If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Can Someone Help me with OLAP?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-23-09, 16:31
rockdave35 rockdave35 is offline
Registered User
 
Join Date: Jan 2009
Posts: 43
Can Someone Help me with OLAP?

DB2 noob here and I have avoided learning OLAP too long. I've read a few tutorials, and the functions are still completely alien to me.

So I tried to code one with our existing data to get an idea of how it functions. Great, syntax errors. I can't figure out what I'm doing wrong. Here is my code:

Code:

SELECT   recip_ssn_mbr, 
         ANTY_PYMT_NET_AMT,
         ROW_NUMBER() over (order by ANTY_PYMT_NET_AMT desc) as test 
FROM     DSNP.PR01_T_ANTY_PYMT

I get "unexpected token ( was found. Any idea what I'm missing? Granted, I don't have a clue what the Row Number would show me. What does "over" mean anyways?
Reply With Quote
  #2 (permalink)  
Old 07-23-09, 20:51
tonkuma tonkuma is offline
Registered User
 
Join Date: Feb 2008
Location: Japan
Posts: 2,193
What platform and DB2 version/release are you using?
If you are using DB2 for z/OS, OLAP specifications are supported from DB2 Version 9.1 for z/OS.
Reply With Quote
  #3 (permalink)  
Old 07-24-09, 06:23
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
Download db2 cook book:
DB2 SQL Cookbook
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On