Board index » delphi » Re: Can You Solve My Problem?

Re: Can You Solve My Problem?


2005-04-02 02:34:01 AM
delphi65
I have had the opinion like that. But I still hesitate. Because I assume
that my program makes the table temporary with a certain name. If my
assumption is implementated, will it not be crash?
Can you give me a small illustration about it?
 
 

Re: Can You Solve My Problem?

Bpk. Adi Wira Kusuma writes:
Quote
I have had the opinion like that. But I still hesitate. Because I
assume that my program makes the table temporary with a certain name.
If my assumption is implementated, will it not be crash?

Can you give me a small illustration about it?
I'm not expert with MS SQL so cannot give you an actual example, but can
assure you that it supports temporary tables *directly*, if I recall
correctly, a table name starting with '@' is temporary to the current user
and '@@' is global temporary.
So the SQL would be something like:
create table @mytemptable (id integer, name varchar(40));
Then Insert rows into as needed, then execute your joined query.
--
Wayne Niddery - Logic Fundamentals, Inc. (www.logicfundamentals.com)
RADBooks: www.logicfundamentals.com/RADBooks.html
Those who disdain wealth as a worthy goal for an individual or a
society seem not to realize that wealth is the only thing that can
prevent poverty. - Thomas Sowell
 

Re: Can You Solve My Problem?

OK, I know it. But I have not understanded about the way of performance
temporary table. If I execute
Create table ## mytemptable ( id integer,
name char(40))
So, Can other users access its table ("mytemptable")? And, how long will the
table still exist? Untill server is off? or till I execute DROP TABLE?
 

Re: Can You Solve My Problem?

Look up CREATE TABLE in the SQL Server Books Online. Scroll down to the
Temporary Tables section. The answers to your questions are there.
--
Bill Todd (TeamB)
TeamB cannot answer questions received via email