|
Posted by Erland Sommarskog on 06/21/05 00:45
(rbonin@gmail.com) writes:
> I need to select and mark 150 records at a time in a large table.
> What I'm trying to do is...
>
>
> Select top 150 xxxx into #temp from largeTable
That creates a table.
> update largeTable set marked = 1 where xxxx in #temp
That's a syntax error.
> I ended up creating the table in it's own statement
> and it is working now, I guess that insert into doesn;t
> create the table, but it doesn't throw an error either.
INSERT does not create a table, that is correct. And if the
table does not exist at that point, there will be an error.
Presumably the issue has to do with deferred name resolution.
But since you did not care to post the actual code, it is
difficult to say exactly what was going on.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
Navigation:
[Reply to this message]
|