Viewing 15 posts - 6,691 through 6,705 (of 10,144 total)
Cadavre (8/31/2011)
Nice one Chris 😉Told you someone would simplify it Greg
Wonder if it works on the real data though?
My money's on CC's script, it's more flexible 😎
August 31, 2011 at 9:44 am
Cadavre (8/31/2011)
greg.bull (8/31/2011)
August 31, 2011 at 9:29 am
How about posting a dozen or so of these values?
August 31, 2011 at 6:37 am
UPDATE #Sample SET Metric2 = ISNULL(NULLIF(Metric1+Metric1-1+Metric1-2,0),1)
😉
August 31, 2011 at 4:29 am
What would be the value for month 5? Is the value 9 correct for month 4?
DROP TABLE #Sample
CREATE TABLE #Sample (Yearmonth DATE, Metric1 INT, Metric2 INT)
INSERT INTO #Sample (Yearmonth, Metric1,...
August 31, 2011 at 3:47 am
Probably like this
SELECT LEFT(LTRIM(RTRIM(SUBSTRING(ISNULL(prefix,''),7,4) + phone)),20)
FROM (
SELECT Prefix = ' 0151', phone = '7217164' UNION ALL
SELECT NULL, '7217164'
) [sample]
but it depends on the...
August 30, 2011 at 10:05 am
Looks like Excel. Try this:
LEFT(LTRIM(RTRIM(SUBSTRING(prefix,7,4) + phone)),20)
August 30, 2011 at 8:06 am
Functions around columns in table dbo.PolicyEntry are causing table scans:
replace(executive1,' ','') = 'DINESHANJARA'
Change these to
[executive1] IN ('DINESHANJARA','DINESH ANJARA').
August 30, 2011 at 7:35 am
;WITH SourceTable AS (
SELECT Id = 1, Projectid = 'xxx', MonHour = 8, TueHour = 6, WedHour = 4, ThHour = 6, FriHour = 5, SatHour = 3 UNION...
August 30, 2011 at 5:20 am
Job's a good 'un. Thanks for the feedback.
August 30, 2011 at 4:37 am
Please post the actual plans, these are estimated plans.
August 30, 2011 at 3:04 am
DROP TABLE #Application
CREATE TABLE #Application (BoxID INT, Province VARCHAR(10), BoxPosition INT)
INSERT INTO #Application (BoxID, Province, BoxPosition)
SELECT 5632, 'KZN', 1 UNION ALL
SELECT 5632, 'KZN', 2 UNION ALL
SELECT 5632, 'KZN', 3 UNION...
August 26, 2011 at 8:54 am
Can you please post the actual plan, and the view definition for ViewEntryDetails.
Cheers
August 26, 2011 at 4:27 am
tfifield (8/24/2011)
ChrisM@Work (8/23/2011)
August 25, 2011 at 1:53 am
Viewing 15 posts - 6,691 through 6,705 (of 10,144 total)