Viewing 15 posts - 3,136 through 3,150 (of 5,393 total)
Gail knows:
http://sqlinthewild.co.za/index.php/2010/09/14/one-wide-index-or-multiple-narrow-indexes/
-- Gianluca Sartori
June 6, 2011 at 7:56 am
Zeal-DBA (6/6/2011)
please let me know wat are the specific things in "operating system concepts" on which i should have strong knowledge as a sql server DBA.
Quite a lot of...
-- Gianluca Sartori
June 6, 2011 at 5:55 am
INSERT INTO #temp (item_code,variant_code)
SELECT DISTINCT T2.psp_item_no,T2.psp_item_var
FROM pmddb..pmd_mpsp_ps_postn T2
WHERE T2.psp_io_flag = 'i'
AND NOT EXISTS (
SELECT 1
FROM #temp AS T1
...
-- Gianluca Sartori
June 6, 2011 at 5:48 am
I think you're right, it should be the other way round.
I'm curious to read other opinions.
-- Gianluca Sartori
June 6, 2011 at 4:34 am
DISTINCT should do:
INSERT INTO #temp (item_code,variant_code)
SELECT DISTINCT T2.psp_item_no,T2.psp_item_var FROM pmddb..pmd_mpsp_ps_postn T2 WHERE T2.psp_io_flag = 'i'
Hope this helps
Gianluca
-- Gianluca Sartori
June 6, 2011 at 4:30 am
WayneS (6/4/2011)
You'll enjoy it even more than being a father... you can spoil them, then hand them back to the parents!
Confirmed!
This is what my in-laws do with my 2...
-- Gianluca Sartori
June 6, 2011 at 1:36 am
Lynn Pettis (6/4/2011)
I am going to be grandfather![/i]
Looks like I'll need...
-- Gianluca Sartori
June 6, 2011 at 1:27 am
Vedran Kesegic (6/3/2011)
This expression is independent of any language and datefirst settings:
-- gives 1 for monday..., 7 for sundaydatepart( weekday, @datetime + @@datefirst - 1 )
This is a really smart...
-- Gianluca Sartori
June 6, 2011 at 1:20 am
You have to group your data on one or more columns:
;WITH SampleData
AS (
SELECT *
FROM (VALUES
(1, 'ABC11'),
(1, 'ABC12'),
(2, 'ABC11'),
(2, 'ABC12'),
(3, 'ABC11'),
(3, 'ABC12'),
(4, 'ABC11'),
(5, 'ABC11'),
(6, 'ABC11'),
(6, 'ABC12'),
(7, 'ABC12')
) AS InputData...
-- Gianluca Sartori
June 3, 2011 at 8:04 am
Lynn Pettis (6/3/2011)
-- Gianluca Sartori
June 3, 2011 at 7:05 am
It should be an index with both fields in it. It should not matter which one first, especially when both tables have billions of rows, as it would probably end...
-- Gianluca Sartori
June 3, 2011 at 7:04 am
Something like this should do:
SELECT *
FROM EMP2
WHERE NOT EXISTS (
SELECT 1
FROM EMP1
WHERE EMP2.Name = EMP1.Name
...
-- Gianluca Sartori
June 3, 2011 at 6:21 am
You can use DATEPART to check the weekday:
select datepart(weekday , getdate())
Depending on your @@DATEFIRST setting, you will have to check for days 1 and 7 (default for US English) or...
-- Gianluca Sartori
June 3, 2011 at 4:35 am
Index rebuild recreates statistics with fullscan. When statistics are rebuilt, all dependant plans get invalidated.
I don't know what happens with index reorganize, but I suspect it doesn't rebuild stats.
Hope this...
-- Gianluca Sartori
June 3, 2011 at 2:56 am
paul.knibbs (5/31/2011)
Jeff Moden (5/29/2011)
Now that's cool. Didn't know that. I may have to look into that... you're getting better gas mileage than my 1300 cc motorcycle.
I average 57mpg...
-- Gianluca Sartori
May 31, 2011 at 9:12 am
Viewing 15 posts - 3,136 through 3,150 (of 5,393 total)