Session-assigned temporary database

When a client connects, Adaptive Server assigns a temporary database to its session. Adaptive Server uses this session-assigned temporary database as a default space where it creates temporary objects (including hashed-temporary tables and worktables) for work the client performs. The session-assigned temporary database remains assigned to the session until the session connects to the client.

Adaptive Server selects temporary databases for a session according to these rules:

To specify that Adaptive Server creates an object in a specific temporary database. For example:

create procedure inv_amounts as
     select stor_id, "Total Due" = sum(amount)
     from #tempstores
     group by stor_id