Hi John,
you need to specify a name for the column that you create with the convert
function. Like this
select distinct convert(varchar(36), amount) id into #temp1 from fred
#temp1 will now have one column called id.
#temp1 can be removed with droptable #temp1 or by closing the connection
to
Hi Matt,
Tables in tempdb are deleted when the connection is closed or when the
user deletes them with drop table #tempname.
- Frank
Hi Frank.
When does this table get deleted? when the DB connection closes or does
one have to run a process to clear the temp tables?
Thanks,
Matt
On
Hi Frank.
When does this table get deleted? when the DB connection closes or does one have to run a process to clear the temp tables?
Thanks,
Matt
On Tue, 2003-12-16 at 17:29, Frank M. Kromann wrote:
Hi,
Any table that starts with # is a temp table. You can use
create table #mytemp (...)
Thanks for your response Frank, but this is still driving me nuts and
making me look like a moron at the same time (-:
This simplified query:
$query = SELECT distinct convert(varchar(36),a.traineeID) INTO #tempdata1;
$query .= FROM tblSignIn_trainee a;
$queryresult = MSSQL_QUERY($query,$cn) or
Hi all,
I've been handed a query which I'm trying to get to work. I'm using PHP
to talk to MSSQL 7.
My question is this: Can I create temp tables with mssql without
executing the code in a stored procedure?
The simplified version of the query is as follows:
$query = SELECT distinct
Hi,
Any table that starts with # is a temp table. You can use
create table #mytemp (...) or you should be able to use the query you
suggest. You just have to make sure you have enough space in tempdb (a
system database)
- Frank
Hi all,
I've been handed a query which I'm trying to get to