Viewing 15 posts - 9,451 through 9,465 (of 10,144 total)
Heh heh! It doesn't have a profanity checker. At least two of my colleagues have something along the lines of "FindTheF****r"!
October 17, 2008 at 8:08 am
Like this...
SELECT
SUM(Amount) AS Amount_1 ,
SUM(CASE WHEN Column_1 = 2 AND Column_2 = 4 THEN Amount ELSE 0 END) AS Amount_2
FROM xyz
WHERE Column_1 = 2
AND Column_2 = 4
AND Column_3 =...
October 17, 2008 at 7:05 am
Karthick,
1. what are you planning to do once you've found a null and stopped "the process"?
2. what is the process for? Is it for finding nulls?
October 17, 2008 at 6:18 am
This is almost certainly easier to test, and quite possibly quicker, if you expand it out into an onion select:
[font="Courier New"]SELECT LagDays, CASE
WHEN LagDays BETWEEN 0 AND 3...
October 17, 2008 at 6:14 am
Using ISNULL?
[font="Courier New"]SELECT m.MonitoredEntityCode,
CASE WHEN m.MonitoredLocationCode = 'EMISSION_POINT_1' THEN m.NumericResult END AS 'EMISSION_POINT_1',
CASE WHEN m.MonitoredLocationCode = 'EMISSION_POINT_2' THEN m.NumericResult END AS 'EMISSION_POINT_2',
CASE WHEN m.MonitoredLocationCode = 'EMISSION_POINT_3'...
October 17, 2008 at 3:37 am
Did some work for a mailing shop some years ago, we used a method like this for the same thing:
[font="Courier New"]DROP TABLE #Test
CREATE TABLE #Test (RECID INT, COL1 CHAR(1), COL2...
October 15, 2008 at 8:54 am
Madhivanan (10/15/2008)
Chris Morris (10/15/2008)
If you create the temp table before executing the string, then (as Barry's code shows) the table...
October 15, 2008 at 5:23 am
You're welcome, barcode, many thanks for the feedback.
October 15, 2008 at 4:24 am
Try this, barcode:
[font="Courier New"]SELECT c.CONTAINERID, '*** FULL CONTENT ***', 7, c.CONTAINERORIGINID, 1, c.COMPANYID, c.SUBCOID, 1, c.DEPT, c.LEVELID, 1
FROM CONTAINERS c
LEFT JOIN INDEXDATA i ON i.CONTAINERID = c.CONTAINERID AND i.INDEXFIELD1...
October 15, 2008 at 3:54 am
That's interesting, I also assumed it took a new connection.
If you create the temp table before executing the string, then (as Barry's code shows) the table is visible to...
October 15, 2008 at 2:59 am
Richard Fryar (10/14/2008)
October 15, 2008 at 2:11 am
October 15, 2008 at 2:08 am
Hi Debbie, as Peso points out, your best bet is a clustered index on person + startdate.
This generates your new column. Personally, I'd normalise that into two columns, but here...
October 14, 2008 at 4:53 am
Debbie, how about posting a chunk of sample data?
October 14, 2008 at 3:36 am
Debbie Edwards (10/14/2008)
I got the first example to bring back data but I dont understand the results. The 2nd example worked also but...
October 14, 2008 at 2:43 am
Viewing 15 posts - 9,451 through 9,465 (of 10,144 total)