Viewing 15 posts - 16,951 through 16,965 (of 18,926 total)
if object_id('Tempdb..#temp') > 0
DROP TABLE #temp
GO
Create table #temp
(
id int not null identity (1,1) primary key clustered,
SSN CHAR(9) not null
)
GO
Insert into #temp (ssn) values ('123456789')
Insert into #temp (ssn) values ('987654321')
Insert into...
June 10, 2005 at 1:19 pm
Well you can create a temp table with identity instead of the current id column, set identity_insert on for that table, ship all your current data to this table,...
June 10, 2005 at 1:09 pm
update the whole table for the field id = 20 or the field id = 20 and is in this query?
June 10, 2005 at 1:06 pm
remove , DateCol and ,@DateCol
You know how to do an insert statement right??
June 10, 2005 at 12:57 pm
hmm not exactly,
(assuming you're gonna create a stored proc to do the insert) :
Insert into dbo.YourTable (Col1, Col2, DateCol, DateBefore, DateAfter) values (@Col1, @Col2, DateCol, dateadd(m, -6, Datefield), dateadd(m,...
June 10, 2005 at 12:49 pm
See my other answer in the other thread.
I've given you what I found... But I don't see how this can be done in vba. I suspect it can be...
June 10, 2005 at 12:46 pm
Yup, there it is :
DECLARE @Temp TABLE
(RowId int NOT NULL IDENTITY(1, 1),
Col1 varchar(20) NULL,
PRIMARY KEY...
June 10, 2005 at 12:44 pm
earlier : dateadd(m, -6, DateField)
later : dateadd(m, 6, DateField)
June 10, 2005 at 12:36 pm
I'd just copy the statement, or make it into a view and use it in both sps.... there's just no need for a temp table in this case, the statement...
June 10, 2005 at 12:32 pm
the where seems to force and index seek (removing a scan.. which is probabely the longest operation of the query).
However I can't really be sure without the relative cost to...
June 10, 2005 at 12:31 pm
Just don't start another one
.
June 10, 2005 at 12:28 pm
Why can't you use a select to do this already?
June 10, 2005 at 12:28 pm
It doesn't guarantee that you will catch all the databases in use.
June 10, 2005 at 12:28 pm
Viewing 15 posts - 16,951 through 16,965 (of 18,926 total)