Viewing 15 posts - 1,936 through 1,950 (of 8,416 total)
SELECT
SUSER_NAME(CONVERT(INTEGER, OBJECTPROPERTYEX(t.object_id, 'OwnerId')))
FROM tempdb.sys.tables AS t
WHERE
t.name LIKE N'#banana%';
...assuming you were looking for temporary tables named '#banana'.
June 30, 2011 at 3:45 am
This can be done in one MERGE statement, and yes there is a way to return the modifications made:
DECLARE @Changes TABLE
(
account_idINTEGER PRIMARY KEY,
the_addressNVARCHAR(100) NOT NULL
);
DECLARE @data TABLE
(
account_idINTEGER NOT...
June 30, 2011 at 3:17 am
There's no need for the transaction or separate insert/delete operation, and the identity issue can be resolved by using a SET option:
IFOBJECT_ID(N'dbo.pArchiveLogs', N'P')
IS NULL
EXECUTE ('CREATE PROCEDURE dbo.pArchiveLogs AS');
ALTER PROCEDURE dbo.pArchiveLogs
(
@Days...
June 30, 2011 at 2:52 am
SELECT DATABASEPROPERTYEX(DB_NAME(), 'Recovery')
June 30, 2011 at 2:39 am
Unfortunately, no. Not much of the internal workings of the optimizer get documented - I guess part of the reason for that is that future changes would involve a...
June 29, 2011 at 6:56 am
cpreager (6/29/2011)
So I think it could be an anomoly of the optimization, given I can't repeat the performance improvement in simpler conditions.
The optimizer does contain rules that match on >=...
June 29, 2011 at 5:17 am
ananda.murugesan (6/29/2011)
By default AUTO_CREATE_STATISTICS ON in SQL 2008 version, please tell me, why it was off?
No idea - it seems likely it was done manually...?
June 29, 2011 at 3:26 am
opc.three (6/28/2011)
dbo.GROUP_CONCAT(i.OffID) AS offidlist
Wouldn't that require the sorted variant to be strictly the same as the FOR XML example?
Also, I don't want to discourage you, but that is very much...
June 29, 2011 at 3:23 am
There's no easy built-in way. You could:
(1) Re-import the data from its source in a consistent format recognizable as a time by SQL Server, and store it in a...
June 29, 2011 at 2:58 am
The cause of the error is pretty self-evident, so I won't labour that point. Using the MERGE syntax may help you write the query more naturally, and make it...
June 29, 2011 at 2:54 am
This should help:
USE [TELEDATA]
GO
-- Allow SQL Server to create missing statistics automatically
ALTER DATABASE TELEDATA SET AUTO_CREATE_STATISTICS ON;
GO
-- Index to help the specific query below
CREATE NONCLUSTERED INDEX [IX dbo.TEL_TXT_LI_ST site (a)]
ON...
June 29, 2011 at 2:32 am
wiseguy (6/27/2011)
June 29, 2011 at 2:19 am
It looks like someone created those indexes using the Management Studio templates and included the data type definition my mistake! You will need to enclose the index name in...
June 29, 2011 at 12:50 am
The following example shows your code rewritten to use appropriate types and to be robust under high concurrency conditions. The return code from the procedure is the number of...
June 29, 2011 at 12:46 am
Jayanth_Kurup (6/28/2011)
http://www.lcard.ru/~nail/sybase/perf/18295.htm
The logic seems sound but i doubt if i will consider it...
June 28, 2011 at 9:04 pm
Viewing 15 posts - 1,936 through 1,950 (of 8,416 total)