Viewing 15 posts - 1 through 15 (of 17 total)
This is a common misconception on table variables. Please see following site ...
http://support.microsoft.com/default.aspx?scid=kb;en-us;305977&Product=sql2k
and in particular...
Q4: Are table variables memory-only structures that are assured better performance as compared to temporary...
August 13, 2004 at 6:56 am
I'm not 100% sure what you are looking for either. Does the below work for you ?? If so, make sure you create an update trigger also with the below...
July 29, 2004 at 3:29 am
Hi Nilesh,
Your indexes seem to have got out of whack .... try updating the statistics or rebuilding the indexes. That should help - from EM, the rowcount is selected from...
July 21, 2004 at 12:40 pm
I always prefer to use the scope_identity() - see example below for the reasons why.
There are times when you may want to use @@identity to return the last inserted...
May 20, 2004 at 3:31 am
Use scope_identity() - will give you the last identity value inserted into an identity column within the same scope ie the procedure / trigger etc....
May 20, 2004 at 3:01 am
exec('select top ' + @number + ' field1 from table A
order by field1')
April 30, 2004 at 3:18 am
Also have a look at log shipping - this will probably suit your scenario better....
April 28, 2004 at 2:54 am
Set up transactional replication and distribute the data daily - or at whatever time slice you need. See Replication in BOL
April 28, 2004 at 2:30 am
Not too sure of your question ?? Is the below what you want ??
SELECT 'Sometext1 ' + au_lname + ' Sometext2'
FROM Authors
UPDATE a
SET a.au_lname = 'Sometext1 ' +a.au_lname +...
April 27, 2004 at 6:54 am
Try this ..... char(10) - Line Feed / char(13) - CR
SET NOCOUNT ON
go
drop table #NEWLINE
go
create table #NEWLINE (Field1 int identity(1,1), Field2 varchar(30))
go
insert #NEWLINE select '1111
11111'
go
select * from #NEWLINE
go
update...
April 27, 2004 at 2:39 am
Not too sure if you have a preference for what Name comes back in the query
Eg : what name do you want for the 3A code, Schel or Mahata...
April 27, 2004 at 2:25 am
If you have an identity field or some unqiue integer field like StorageLocationID - unique id .... the below will work
drop table #StorageLocation
go
create table #StorageLocation ( StorageLocationID int identity(1,1)...
April 23, 2004 at 2:05 am
The query below would give better performance....
SELECT Company
FROM TEMP
WHERE City IN ('LA','NY')
GROUP BY Company
HAVING COUNT(*) = 2
April 22, 2004 at 3:30 am
I always search syscomments...
Select distinct so.type,so.name
FROM syscomments sc
JOIN Sysobjects so
on so.id = sc.id
and sc.text like '%MyView1%'
April 21, 2004 at 7:46 am
Misunderstood original Q...try below
Select ID
FROM Table
Where IACID IN (1,2,5)
AND IExpID >=12
GROUP BY ID
HAVING COUNT(*) = 3
April 21, 2004 at 3:27 am
Viewing 15 posts - 1 through 15 (of 17 total)