Need to change the query with out referring to partition...

we have a partition on a table called (INBOUND) and (OUTBOUND) - table is list partitioned ...
we have to drop the partition so have to have a alternate for the inbound_outbound_ind ....etc..
i have attached a file which shows a query... can you help me rewrite the query when the partition is dropped...... change-this-query.txt
Rao_SAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slightwv (䄆 Netminder) Commented:
>>FIRST_VALUE (inbound_seq_pk) OVER (PARTITION BY miss_object_id ORDER BY seq_nbr ASC)

This is NOT like table partitions and has nothing to do with them.  the 'partition by' clause of a data warehouse window function like FIRST_VALUE is the same as a 'group by' clause on a regular select.

It tells the function how to group the 'window'.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HainKurtSr. System AnalystCommented:
     (SELECT DISTINCT FIRST_VALUE (inbound_seq_pk) OVER (PARTITION BY miss_object_id ORDER BY seq_nbr ASC) /** i dont understand this line */

this means, group the records by miss_object_id, then order by seq_nbr ASC and get the first_value
HainKurtSr. System AnalystCommented:
also the query you posted is not complete, it requires "FROM someTable" clause...
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Rao_SAuthor Commented:
sorry about that...
attached the corrected file... change-this-query.txt
Christoffer SwanströmPartnerCommented:
The relevant part of the query is actually this:


UPDATE aqtit01.tqt_it_inbound_seq PARTITION(INBOUND)


Can you post the table definition (including the partitioning).

I think you will be able to replace the PARTIITON(INBOUND) by an additional WHERE clause that specifies the equivalent of the partition values for INBOUND.
Rao_SAuthor Commented:
thank you..!!!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.