Viewing 15 posts - 181 through 195 (of 616 total)
CREATE TRIGGER [DDLTriggerLimitNumberOfDBs]
ON ALL SERVER
FOR CREATE_DATABASE
AS
SET NOCOUNT ON
DECLARE @MSG VARCHAR(500)
...
June 19, 2013 at 4:45 am
Maybe something like this:
select a.ItemID, a.ItemName, ISNULL(b.Qty, 0)
FROM Inventory AS a
LEFT JOIN Sales AS b
ON a.ItemID = b.ItemID
June 19, 2013 at 4:22 am
Jan Van der Eecken (6/18/2013)
May I humbly ask why you want to do this in the first place?
This can be useful when performing record linkage and importing data into...
June 19, 2013 at 2:31 am
Yea got it thanks. Not sure these sprocs work, I've seen a couple of syntax errors in there. Will have a go but difficult with no sample data.
June 18, 2013 at 10:08 am
Fair enough 🙂
Can you post one of the sproc or that part which creates the tables using cursors?
June 18, 2013 at 9:43 am
If that's the only use for the cursors then I wouldn't waste your time rewriting them if they already work. I doubt you'll notice much performance difference with a set-based...
June 18, 2013 at 9:36 am
Here you go...
p.s.
I got this off the internet ages ago but I can't remember where! Anyway props to the people who compiled it 🙂
June 18, 2013 at 8:07 am
Have you checked wait stats?
I got into the habit of using the below query for initial investigation into performance related prolems:
This is from Paul Randals blog: http://www.sqlskills.com/blogs/paul/
WITH [Waits] AS
...
June 13, 2013 at 1:59 am
Have a read of this: http://msdn.microsoft.com/en-us/library/ms189461.aspx
June 12, 2013 at 2:43 am
with SCC_CTE(vend_i, dept, tot_wgt)
as (select 1, 1, 75 union all
select 2, 2, 40 union all
select 3, 4, 50 union all
select 3, 5, 80)
select vend_i, dept from
(select ROW_NUMBER() over (Partition...
June 12, 2013 at 2:17 am
From MSDN:
varchar [ ( n | max ) ]
Variable-length, non-Unicode string data. n defines the string length and can be a value from 1 through 8,000. max indicates that...
June 6, 2013 at 5:37 am
SELECT
Service
,CustomerName
,ConnectDate
,Disconnect
FROM Table1
EXCEPT
SELECT
Service
,CustomerName
,ConnectDate
,Disconnect
FROM Table2
SELECT
Service
,CustomerName
,ConnectDate
,Disconnect
FROM Table2
EXCEPT
SELECT
Service
,CustomerName
,ConnectDate
,Disconnect
FROM Table1
May 30, 2013 at 5:25 am
Jeff, thanks so much for your ideas and suggestions. I've spent a few days on this problem and the table has been restructured and a new indexing strategy has been...
May 28, 2013 at 10:20 am
Viewing 15 posts - 181 through 195 (of 616 total)