Sponsored Content
Full Discussion: Tough Oracle Logic in Ux
Top Forums UNIX for Advanced & Expert Users Tough Oracle Logic in Ux Post 302396780 by magedfawzy on Friday 19th of February 2010 09:18:17 AM
Old 02-19-2010
Tough Oracle Logic in Ux

How Can this logic be implemented in Unix

Code:
SELECT
    B.SERVICE_TYPE       || '|' ||
    B.TOTAL_TYPE         || '|' ||
    B.CALL_INDICATOR     || '|' ||
    B.A_NUMBER           || '|' ||
    B.APN                || '|' ||
    B.DAY                || '|' ||
    B.HOUR               || '|' ||
    B.DURATION           || '|' ||
    B.PARTIAL_INDICATOR  || '|' ||
    B.EQUIPMENT_ID_A     || '|' ||
    B.LOCATION_AREA_ID   || '|' ||
    B.DATA_VOLUME_INCOMING|| '|' ||
    B.DATA_VOLUME_OUTGOING|| '|' ||
    B.DW_BATCH_ID         || '|' ||
    B.CALL
FROM (
SELECT
    ROW_NUMBER()
        OVER (PARTITION BY SERVICE_TYPE,TOTAL_TYPE,CALL_INDICATOR,A_NUMBER,APN,DAY,HOUR
                ORDER BY SERVICE_TYPE,TOTAL_TYPE,CALL_INDICATOR,A_NUMBER,APN,DAY,HOUR) RN
    ,SERVICE_TYPE
    ,TOTAL_TYPE
    ,CALL_INDICATOR
    ,A_NUMBER
    ,APN
    ,DAY
    ,HOUR
    ,PARTIAL_INDICATOR
    ,EQUIPMENT_ID_A
    ,LOCATION_AREA_ID
    ,DW_BATCH_ID
    ,SUM(DURATION)
        OVER (PARTITION BY SERVICE_TYPE,TOTAL_TYPE,CALL_INDICATOR,A_NUMBER,APN,DAY,HOUR
                ORDER BY SERVICE_TYPE,TOTAL_TYPE,CALL_INDICATOR,A_NUMBER,APN,DAY,HOUR) DURATION
    ,SUM(DATA_VOLUME_INCOMING)
        OVER (PARTITION BY SERVICE_TYPE,TOTAL_TYPE,CALL_INDICATOR,A_NUMBER,APN,DAY,HOUR
                ORDER BY SERVICE_TYPE,TOTAL_TYPE,CALL_INDICATOR,A_NUMBER,APN,DAY,HOUR) DATA_VOLUME_INCOMING
    ,SUM(DATA_VOLUME_OUTGOING)
        OVER (PARTITION BY SERVICE_TYPE,TOTAL_TYPE,CALL_INDICATOR,A_NUMBER,APN,DAY,HOUR
                ORDER BY SERVICE_TYPE,TOTAL_TYPE,CALL_INDICATOR,A_NUMBER,APN,DAY,HOUR) DATA_VOLUME_OUTGOING
    ,SUM(CALL)
        OVER (PARTITION BY SERVICE_TYPE,TOTAL_TYPE,CALL_INDICATOR,A_NUMBER,APN,DAY,HOUR
                ORDER BY SERVICE_TYPE,TOTAL_TYPE,CALL_INDICATOR,A_NUMBER,APN,DAY,HOUR) CALL
FROM
    P_NETWORK_GPRS_1) B
WHERE B.RN=1;

Is it really possible, need some help badly from the experts on this forum..

a very high requirement is performance.. that's why i'm trying to convert to unix.

Thanks
 

We Also Found This Discussion For You

1. UNIX for Dummies Questions & Answers

tough parsing

I have a string as "Period= 20090531 Client Name= Clayton Lumbar Company Destination= MD" I want to parse the string and store it in 3 different variables. $period (should get value 20090531) $client (should get value "Clayton Lumbar company") $dest (should get value MD) How can I do... (3 Replies)
Discussion started by: paruthiveeran
3 Replies
DBIx::Class::Storage::DBI::Oracle::WhereJoins(3)	User Contributed Perl Documentation	  DBIx::Class::Storage::DBI::Oracle::WhereJoins(3)

NAME
DBIx::Class::Storage::DBI::Oracle::WhereJoins - Oracle joins in WHERE syntax support (instead of ANSI). PURPOSE
This module is used with Oracle < 9.0 due to lack of support for standard ANSI join syntax. SYNOPSIS
DBIx::Class should automagically detect Oracle and use this module with no work from you. DESCRIPTION
This class implements Oracle's WhereJoin support. Instead of: SELECT x FROM y JOIN z ON y.id = z.id It will write: SELECT x FROM y, z WHERE y.id = z.id It should properly support left joins, and right joins. Full outer joins are not possible due to the fact that Oracle requires the entire query be written to union the results of a left and right join, and by the time this module is called to create the where query and table definition part of the SQL query, it's already too late. METHODS
See DBIx::Class::SQLMaker::OracleJoins for implementation details. BUGS
Does not support full outer joins. Probably lots more. SEE ALSO
DBIx::Class::SQLMaker DBIx::Class::SQLMaker::OracleJoins DBIx::Class::Storage::DBI::Oracle::Generic DBIx::Class AUTHOR
Justin Wheeler "<jwheeler@datademons.com>" CONTRIBUTORS
David Jack Olrik "<djo@cpan.org>" LICENSE
This module is licensed under the same terms as Perl itself. perl v5.18.2 2013-07-12 DBIx::Class::Storage::DBI::Oracle::WhereJoins(3)
All times are GMT -4. The time now is 01:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy