Oracle n mssql

  • I have two columns in which column1 has interger and column2 has data like this 'Sat Oct 01 00:00:00 GMT-0400 (Eastern Daylight Time) 2011'. In the oracle they have used cume(column1,column2). My question is does anyone know what we need to use in Mssql in order to get the same result.

    Thanks

  • There isn't a native equivalent in T-SQL. You'd probably need to use a CLR function to build one for that.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • k Thanks will try using function

  • swetha2813 (11/10/2011)


    I have two columns in which column1 has interger and column2 has data like this 'Sat Oct 01 00:00:00 GMT-0400 (Eastern Daylight Time) 2011'. In the oracle they have used cume(column1,column2). My question is does anyone know what we need to use in Mssql in order to get the same result.

    Thanks

    I only worked with Oracle for a year so this is new to me, cume(column1,column2). What does it do?

  • Lynn Pettis (11/10/2011)


    swetha2813 (11/10/2011)


    I have two columns in which column1 has interger and column2 has data like this 'Sat Oct 01 00:00:00 GMT-0400 (Eastern Daylight Time) 2011'. In the oracle they have used cume(column1,column2). My question is does anyone know what we need to use in Mssql in order to get the same result.

    Thanks

    I only worked with Oracle for a year so this is new to me, cume(column1,column2). What does it do?

    May be a typo for CUBE().

    SELECT DEPTNO, JOB, COUNT(*)

    FROMEMP

    GROUP BY CUBE(DEPTNO,JOB);

    OR CUME_DIST() for cumulative distribution

    SELECT CUME_DIST(15500, .05) WITHIN GROUP

    (ORDER BY salary, commission_pct) "Cume-Dist of 15500"

    FROM employees;

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply