Viewing 15 posts - 2,551 through 2,565 (of 10,144 total)
Jakub.Janda (3/24/2015)
March 24, 2015 at 10:33 am
Hey Grant, in the Plan1 execution plan there's a NLIJ with "Expr1004" in the Outer References list. Any idea what the "Expr1004" is for and where it was constructed?
March 24, 2015 at 6:08 am
Phil Parkin (3/24/2015)
Actual rows and Est rows are very different. Are your statistics up to date?
Agreed. We don't have index definitions yet either:
SELECT TOP 1
l.fkTblCountry,
l.sCity
FROM tblGeoIPLocation l
INNER JOIN tblGeoIPBlock b...
March 24, 2015 at 4:55 am
sarath.tata (3/23/2015)
SELECT
CASE WHEN CHARINDEX(' ', Supervisor, CHARINDEX(' ', Supervisor, 0) + 1) > 0 THEN
LEFT(Supervisor, CHARINDEX(' ', Supervisor, CHARINDEX('...
March 23, 2015 at 9:43 am
CREATE TABLE #Names (Fullname VARCHAR(50))
INSERT INTO #Names (Fullname)
SELECT 'Potter, James J' UNION ALL
SELECT 'Williams, Ted R' UNION ALL
SELECT 'Allen, Gary G' UNION ALL
SELECT 'Allen, Gary Graham' UNION ALL
SELECT 'Allen, Gary...
March 23, 2015 at 9:34 am
Anju Renjith (3/23/2015)
9776210000061111DTaP/IPV/Hib11
9776310000061141DTaP/IPV/Hib21
9776410000061161DTaP/IPV/Hib31
1540611000006110 6DTaP/IPV pre-school booster41
9776610000061178dTaP/IPV 51
4052810000001182PCV 12
4053010000001172PCV ...
March 23, 2015 at 7:56 am
aslamnepanagar (3/23/2015)
Hi Chris,Though the results are not matching . I like the logic.
I keep it open for a day for any other approach else I will mark as solution.
Aslam
Can...
March 23, 2015 at 5:41 am
jaggy99 (3/22/2015)
March 23, 2015 at 2:58 am
aslamnepanagar (3/23/2015)
Need one help in the following query using adventureworks database.
Select s.businessentityid,
sum(s2008.salesquota) Total2008
,sum(s2007.salesquota) Total2007
from sales.salesperson s
left outer join sales.salespersonquotahistory s2008
on s.businessentityid=s2008.businessentityid
and year(s2008.quotadate)= 2008
left outer join sales.salespersonquotahistory s2007
on s.businessentityid=s2007.businessentityid
and...
March 23, 2015 at 2:42 am
mattech06 (3/20/2015)
they sound like good suggestions but..
check the execution plan - how?
recompile option with timeout query - how?
statistics properly updated - how?
check if index is fragmented - how? -...
March 20, 2015 at 8:13 am
-- Tested and working
DECLARE @Statement VARCHAR(1000), @Year SMALLINT, @AgencyCode VARCHAR(5)
SELECT @Year = 2014, @AgencyCode = '57LHS'
SET @Statement = '
SELECT
[Complaint Number] = QNUMBM,
[Complaint Date] = QCMPDM,
[Complaint Reason] =...
March 20, 2015 at 5:17 am
raza.qadri (3/19/2015)
job_order is primary key so always single value:...
Yes that's correct, however if more than one row are affected by an insert/update/delete, then the trigger tables will contain more than...
March 19, 2015 at 8:05 am
March 19, 2015 at 7:58 am
chris.puncher (3/19/2015)
March 19, 2015 at 7:18 am
DaPainKiller (3/18/2015)
Final code:
WITH cte AS
(
SELECTTestId,
TestDate,
--[GroupBy] = TestDate - rn,
RANK() OVER (
PARTITION BYTestId
ORDER BYTestDate - rn
)AS OrderId
FROM(
SELECTTestId,
TestDate,
ROW_NUMBER() OVER
(
PARTITION BY TestId
ORDER BY...
March 18, 2015 at 8:12 am
Viewing 15 posts - 2,551 through 2,565 (of 10,144 total)