Viewing 15 posts - 301 through 315 (of 1,923 total)
depends on what the SP FRACAS_TicketVsEvent does
March 29, 2012 at 5:17 pm
Toby Harman (3/29/2012)
Hate to point this out, but ColdCoffee's approach is returning inaccurate results.Specifically, it returns customers 6 and 7 from the original test data.
That proves why my code...
March 29, 2012 at 4:54 pm
GSquared (3/29/2012)
You don't actually need the case statement:
SELECT STUFF(Y, 1, PATINDEX('%[^0]%', Y)-1, '')FROM (VALUES('123'),('0123'),('000123')) AS X(Y);
Works just fine.
Yeah Gus, it occured to me just after posting the code. Thanks for...
March 29, 2012 at 3:10 pm
How about this?
; WITH CTE AS
(
SELECT P.CustomerID
, Indicator1 = CASE WHEN P.ProductCode IN('A') THEN 0
WHEN P.ProductCode IN('C') THEN -1
END
,...
March 29, 2012 at 1:44 pm
THis?
SELECT Tab.String
,NewStr = CASE WHEN LEFT(Tab.String,1) = '0' THEN STUFF (Tab.String,1, PATINDEX('%[1-9]%',Tab.String) -1 , '' )
...
March 29, 2012 at 1:26 pm
This?
SELECT Tab.String
,NewStr = CASE WHEN LEFT(Tab.String,1) = '0' THEN STUFF (Tab.String,1,1,'')
...
March 29, 2012 at 1:25 pm
Can you post the query you tried ?
And also, can you post the data in readily-consumable format? I cannot download content at my office.
Please read here on how ro format...
March 29, 2012 at 12:55 pm
Interestingly, this yields 0 for a table that contains no null values and also uses COUNT(*) as the StreamAggregate operator. (It is also once noted by Paul White, but i...
March 29, 2012 at 9:40 am
Sean Lange (3/29/2012)
Try this examples to know how COUNT(*) and COUNT(1) can vary depending the data contained in the columns.
You have me a bit confused by this. Count(*) and Count(1)...
March 29, 2012 at 9:31 am
chintan.j.gandhi (3/29/2012)
SELECT DISTINCT CustomerID
FROM #Purchase P
WHERE EXISTS...
March 29, 2012 at 2:27 am
LIke this
IF OBJECT_ID('TempDB..#Temp') IS NOT NULL
DROP TABLE #Temp;
GO
;
CREATE TABLE #Temp
(
Store INT
,PhoneNr VARCHAR(20)
)
;
INSERT INTO #Temp (Store,PhoneNr)
...
March 29, 2012 at 1:46 am
dwain.c (3/29/2012)
So I think what you're saying (I am not an XML Plan-master, nor even a Paduan) is that COUNT(column_name) returns the number of rows that have non-NULL values? ...
March 29, 2012 at 1:08 am
dwain.c (3/28/2012)
March 28, 2012 at 11:56 pm
Viewing 15 posts - 301 through 315 (of 1,923 total)