Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2010
    Posts
    10

    Unanswered: regarding queries

    hi,
    i have a sql query using "with clause"

    with <table_name> return as ( select query )

    i want to use this query in sybase sql but i dont find any way of running this query.
    can any body tell me that what is the replacement of with clause in sybase.
    i.e how to write the query similar to the query given above which run on sybase & have same execution style.



    also i want to know how can we do the intersection on 2 tables in sybase sql.

    i.e i want to know the substitute of "with clause" & "intersect operator" in sybase sql.

  2. #2
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    You might be able to use a derived table

  3. #3
    Join Date
    Sep 2010
    Posts
    10

    regarding with clause

    thanks,

    but is there nothing like with clause in sybase sql.

    & whats about the intersection operator.
    how to write the query to do intersection of two table.

  4. #4
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    Can you explain what the query is supposed to do
    Give sample data
    and expected output using the sample data
    we might be able to suggest a solution

  5. #5
    Join Date
    Sep 2010
    Posts
    10

    regarding queries

    hi
    sorry for delayed reply

    i didnt got the time to create an example for my question

    but i just want to know that is sybase does not support the with clause .
    & is the use of derived tables will effect the way of execution of query.


    mean while m stuck with another problems.

    i have database of arround 90gb i have some queries which i have runned on sql server , & on db2 . these queries never took more than 10-20 min in these databases . but now when i m running these queries on sybase they are taking more than 2 hrs & then also not completing(still running & also not giving any error) .

    i have sybase 15.5 developer edition .
    also one thing i found strange is that when i runned these queries on sybase with not created statistics on database tables then they took reasonable time to finish(i.e they got finished within 30 min always) but after creating the statistics they are not even finishing after 2 hrs & more.


    what could be the problem now & how can i resolve this problem

Posting Permissions

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