Viewing 15 posts - 17,971 through 17,985 (of 18,923 total)
You can delete your post if you click the edit button. / then delete
April 28, 2005 at 1:42 pm
select ...
into #T1
from Source
where 1 = 0
--this forces to create the table only without inserting any rows, therefore taking virtually no time and releasing the locks immediatly.
April 28, 2005 at 1:16 pm
Why do they even do select into??? Can't a straight select be used to present the report?
Assuming that it can't be used, I'd strongly suggest creating a permanent reporting...
April 28, 2005 at 1:04 pm
You're right... I was assuming a bit column but it could be something else... It's just that = usually works faster that because indexes can be used.
Also should...
April 28, 2005 at 1:01 pm
How about this for faster solution :
GO
CREATE TABLE [Numbers] (
[PkNumber] [int] IDENTITY (1, 1) NOT NULL ,
CONSTRAINT [Pk_Number] PRIMARY KEY CLUSTERED
(
[PkNumber]
) ON [PRIMARY]
) ON [PRIMARY]
GO
Declare...
April 28, 2005 at 12:43 pm
oh ok... This is why we usually ask people to send us the real query with real tables. That way our responses work right away.
Good luck with the rest...
April 28, 2005 at 12:32 pm
Ya but with the gaz costs these days I'd keep it turned off
.
April 28, 2005 at 12:30 pm
You need the syntaxe to do the insert??
Insert into dbo.NewTempTable (Col1, col2...) Select Col1, Col2 from dbo.tempTable1
truncate tempTable1 to empty the main temp table.
April 28, 2005 at 12:29 pm
Just like a wrestle tag team match... The ring is yours Noeld
.
April 28, 2005 at 12:21 pm
we're both making assumptions and without the code there's no point in continuing this discussion.. I'll wait for his answer before drawing any final conclusion.
April 28, 2005 at 12:18 pm
It's pretty much the same thing I said. What else do you need to know?
April 28, 2005 at 12:01 pm
Nah...
For the whole month... so it makes more sens
.
April 28, 2005 at 11:52 am
Viewing 15 posts - 17,971 through 17,985 (of 18,923 total)