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
COLUMN(1)						    BSD General Commands Manual 						 COLUMN(1)

NAME
column -- columnate lists SYNOPSIS
column [-tx] [-c columns] [-s sep] [file ...] DESCRIPTION
The column utility formats its input into multiple columns. Rows are filled before columns. Input is taken from file operands, or, by default, from the standard input. Empty lines are ignored. The options are as follows: -c Output is formatted for a display columns wide. -s Specify a set of characters to be used to delimit columns for the -t option. -t Determine the number of columns the input contains and create a table. Columns are delimited with whitespace, by default, or with the characters supplied using the -s option. Useful for pretty-printing displays. -x Fill columns before filling rows. ENVIRONMENT
The COLUMNS, LANG, LC_ALL and LC_CTYPE environment variables affect the execution of column as described in environ(7). EXIT STATUS
The column utility exits 0 on success, and >0 if an error occurs. EXAMPLES
(printf "PERM LINKS OWNER GROUP SIZE MONTH DAY " ; printf "HH:MM/YEAR NAME " ; ls -l | sed 1d) | column -t SEE ALSO
colrm(1), ls(1), paste(1), sort(1) HISTORY
The column command appeared in 4.3BSD-Reno. BUGS
Input lines are limited to LINE_MAX (2048) bytes in length. BSD
July 29, 2004 BSD
All times are GMT -4. The time now is 07:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy