Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2010
    Posts
    25

    Unanswered: temporay table issue.

    In sybase 12.5, when a temporary table is created it does not exist even for the same session.

    eg.

    CREATE TABLE #people
    (
    id INT,
    name VARCHAR(32)
    ) ;


    msg : Table created successful.

    select *
    from
    #people

    msg #people not found.

    Is their any specific setting we need to do using sp_configure.

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    Are you issuing both queries from the same connection?

  3. #3
    Join Date
    Jun 2009
    Posts
    25
    Hi,

    If the temp table created and selected from the same session defnitely it will work.

  4. #4
    Join Date
    Jan 2010
    Posts
    25
    For MCrowley:

    yes both the queries was fired from the same session.

    For erovij:

    That is what even I believe. But this is not the case over here in sybase 12.5.
    Was shocked !!!. I Strongly feels that there is some settings which needs to be done using sp_configure.
    Last edited by alirulez999; 02-11-10 at 01:21.

  5. #5
    Join Date
    Feb 2009
    Location
    Prague
    Posts
    17
    Are you doing it in isql?
    After creating the table #people, go to tempdb and select * from sysobjects.
    Check if the table exists. And provide the output if possible.

  6. #6
    Join Date
    Jun 2007
    Location
    London
    Posts
    2,527
    Quote Originally Posted by alirulez999 View Post
    Was shocked !!!
    I'd be stunned. I've been using Sybase for decades and have only found one issue in all that time (fixed in one of the very very early versions). Are you absolutely certain you're in the same session?

  7. #7
    Join Date
    Jan 2010
    Posts
    25
    CREATE TABLE #people
    (
    id INT,
    name VARCHAR(32)
    ) ;

    select *
    from
    sysobjects;

    Both the above query was fired altogher, in a single run. I have got this #people______00000120009549451 table created.


    But when both the queries was fired one by one, then even the sysobjects of tempdb does not contain entry for #people table.

    Very weird.

Posting Permissions

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