Results 1 to 5 of 5

Thread: SQL Advantage

  1. #1
    Join Date
    Dec 2002
    Location
    India
    Posts
    3

    Post Unanswered: SQL Advantage

    i have a table contaning 40000 rows.
    i want to ristrict the result to for first 20000..
    In PL SQL, we can use rownum.
    in Sybase any similar one..

    Thanks in Advance,

    Sudhakar

  2. #2
    Join Date
    Sep 2002
    Location
    Germany, near Aachen
    Posts
    120

    Re: SQL Advantage

    i have a table contaning 40000 rows.
    i want to ristrict the result to for first 20000..
    In PL SQL, we can use rownum.
    in Sybase any similar one..


    set rowcount 20000
    go

  3. #3
    Join Date
    Dec 2002
    Location
    india
    Posts
    3

    Re: SQL Advantage

    Originally posted by sudhakalluri
    i have a table contaning 40000 rows.
    i want to ristrict the result to for first 20000..
    In PL SQL, we can use rownum.
    in Sybase any similar one..

    Thanks in Advance,

    Sudhakar
    Hi Sudha

    Before running your query give a set command
    like

    set rowcount 20000
    and execute your query you will get only specified no of rows. After that you wish to get total rows then

    set rowcount 0

    I think this will help u.

    Regds,
    Siva

  4. #4
    Join Date
    Dec 2002
    Location
    India
    Posts
    3
    Hi,
    i have a table with 40000 records..
    if i want to get only the rows from 20000-40000..the last half of the records..
    how can i get?

    Sudhakar

  5. #5
    Join Date
    Dec 2002
    Location
    india
    Posts
    3
    Originally posted by sudhakalluri
    Hi,
    i have a table with 40000 records..
    if i want to get only the rows from 20000-40000..the last half of the records..
    how can i get?

    Sudhakar
    Hi Sudhakar

    There is no specific rowid concept in sybase. In sybase we can have identity column which is equavalent to rowid in oracle but not useful in sql queries. For you requirement you can have condition which satisfies your requirement , otherwise use bcp command with F,L options.

    Siva

Posting Permissions

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