Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2002
    Location
    Madrid - Spain
    Posts
    422
    Provided Answers: 1

    Unanswered: Select in dpf with thirty partitions

    Hi collegues,
    I have a table with thirty partitions, i need count the records un every partition with a date. Example.
    Select count(*) from schema.table where fecha > '01/12/2016' > output_file
    Thank you form advanced
    DBA DB2 for LUW

  2. #2
    Join Date
    Jul 2013
    Location
    Moscow, Russia
    Posts
    666
    Provided Answers: 55
    Hi,

    try this:
    Code:
    Select dbpartitionnum(fecha), count(*) from schema.table where fecha > '01/12/2016' group by dbpartitionnum(fecha)
    Regards,
    Mark.

Posting Permissions

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