Solved

Temp tables in Sybase

Posted on 2010-11-28
6
867 Views
Last Modified: 2012-08-13
Hi, what is the alternative for the problem of the temporal tables in sysbase, i have a lot of stored procedures nested, for that problem i can use transactions and that is not a solution, and why sybase supprot only 4 temp tables?, i ask the people of sybase and they told me that support more than 200, but if i create more than 3 temp tables in a stored the fourth one is missing.

Thank you
0
Comment
Question by:inferencia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 14

Accepted Solution

by:
Jan_Franek earned 63 total points
ID: 34228466
I use more than 4 temp tables regularly, so I believe, there no such low limit on number of temp tables.

I just dimly remember, that I have encountered some problem with temp tables naming. It was something with quite long names.

What names are you using for your temp tables ? And what version of Sybase database are you running ?
0
 
LVL 24

Assisted Solution

by:Joe Woodhouse
Joe Woodhouse earned 62 total points
ID: 34229198
Every Sybase database product can handle more than 4 temp tables in a procedure!

Can you tell us exactly which product (Sybase has many database products) and version you are using?

Maybe also post your code...
0
 

Author Comment

by:inferencia
ID: 34236439
thanks for your comments,  i found that the proble was from configuration..  a flag name "dll in tran" in Sybase, i changed that for true and that problem was solved.

For the another problem "temp tables in nested sp", the error ithat the transaction is missin.."error 266.. i think".. the only way for now i found for that problem is:
I needed to copmpile all the temp tables for the stored procedures before used it  then i open the transaction and create the temp tables (all) in the stored procedure father.

If you have another way because this is very difficult to support,please tell me. I send an example for the code that i used for that problem  ManejodeSpAnidados.sql ManejodeSpAnidados.sql
0
 
LVL 24

Expert Comment

by:Joe Woodhouse
ID: 34247106
Experts Exchange prefers additional questions be raised in new posts. Since this is sorta related I'll answer it here but I think if you need to ask any further questions it's best to open one or more new top-level posts.

What is the exact version of Sybase ASE you're using? (It now seems obvious that it is ASE but we need to know more about versions.)

In most versions until very recently, objects must exist before they can be used. It's fine to create and then use a temp table in the same batch or stored procedure, but if you are creating a temp table in one place and then referring to it in another, it must exist at the time you're creating that second object...

... unless you're using the absolutely most recent version.

So yes, you have to do this:

-- manually create temp table
-- create proc B that uses the temp table
-- manually drop the temp table
-- create proc A that creates the temp table and then calls proc B

You must manually create the temp table because otherwise creating proc B will fail - proc B is trying to use an object that doesn't exist unless you manually create it first.

You must then manually drop the temp table after creating proc B, else creating proc A will fail - is it trying to create an object that already exists unless you manually drop it first.
0
 
LVL 29

Expert Comment

by:leonstryker
ID: 35510886
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL Query 2 348
Installing Sybase IQ 16.x x64 on Windows 8.1 update1 5 1,605
Reading ASE Optimizer trace flag / switch output 4 602
Need help with SYBASE syntax 5 101
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
Arrow Electronics was searching for a KVM  (Keyboard/Video/Mouse) switch that could display on one single monitor the current status of all units being tested on the rack.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question