Results 1 to 1 of 1
  1. #1
    Join Date
    Nov 2004

    Question Unanswered: Group By Trunc()


    I am tranforming my Oracle queries to Sybase queries and got struck when i encountered GROUP BY with a function.

    Could you please give me the equivalent of Sybase syntax, for the Oracle syntax below.

    Oracle Syntax:

    SELECT * FROM "tbl"
    WHERE TRUNC( "tbl"."col1") > 1
    GROUP BY TRUNC( "tbl"."col1")

    What is the equivalent Sybase Syntax?

    The following are the suggestions i got till now.

    sugg 1:
    SELECT *
    FROM "tbl"
    WHERE FLOOR("tbl"."col1") > 1
    GROUP BY FLOOR("tbl"."col1"),
    "tbl"."col1" WITH TRUNC

    sugg 2:
    SELECT *
    FROM "tbl"
    WHERE FLOOR("tbl"."col1") > 1
    GROUP BY FLOOR("tbl"."col1")

    Last edited by gopidba; 01-12-05 at 03:08.

Posting Permissions

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