Creating temp tables in MSSQL
| From: | John Krewson | Date: | Tue, 16 Dec 2003 21:18:02 +0000 |
| Subject: | Creating temp tables in MSSQL | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-32088@lists.php.net to get a copy of this message | ||
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 convert(varchar(36),traineeID)";
$query.=" INTO #tempdata1";
$query.=" FROM tblSignIn_trainee a";Later on I could make a stored procedure, but at the moment I would like to just work with the query directly in the code if at all possible. Thanks, John