Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2009
    Posts
    46

    Unanswered: 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?

  2. #2
    Join Date
    Feb 2008
    Location
    Japan
    Posts
    3,483
    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.

  3. #3
    Join Date
    Jan 2003
    Posts
    1,605
    Download db2 cook book:
    DB2 SQL Cookbook

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •