Viewing 15 posts - 421 through 435 (of 2,007 total)
My solution was returning a float and involved converting to BINARY(8).
I never got time to fix a bug in it (I'm busy writing an upgrade for migrating our old...
October 31, 2012 at 4:39 am
I think I can see a way to do this. Let me iron some stuff out and I'll get back to you.
October 29, 2012 at 10:41 am
yeshupandit_2002 (10/26/2012)
Like
declare @skills TABLE
(
ACCOUNTNOVARCHAR(5),
...
October 26, 2012 at 5:22 am
Sorry, only just spotted your reply!
Gohloum (10/25/2012)
October 26, 2012 at 5:19 am
Could you not just write it like this: -
UPDATE fi
SET fi.cor = 'Y', fi.tam = 'Z'
FROM (SELECT referencia
FROM arttamcor
...
October 26, 2012 at 4:58 am
SELECT ACCOUNTNO,
MAX(CASE WHEN rn = 1 THEN SKILL END) AS Skill1,
MAX(CASE WHEN rn = 2 THEN SKILL END) AS Skill2,
MAX(CASE WHEN rn = 3 THEN SKILL END) AS Skill3
FROM...
October 25, 2012 at 8:37 am
britinusa (10/25/2012)
Migrating a db server from MS SQL Server 2000 to 2005.
In SQL 2000 editing a storedproc was easy. Properties...
October 25, 2012 at 8:32 am
Luis Cazares (10/25/2012)
My code
SELECT @HOLDER = ID
FROM #testEnvironment
WHERE PARSENAME( CAST(yourData AS NVARCHAR(MAX)),3) IS NULL
AND PARSENAME(CAST(yourData AS...
October 25, 2012 at 8:29 am
Good idea Mark. I also added an ugly XML split to count the number of "items", then modified the test script to clear the cache between each piece of...
October 25, 2012 at 7:21 am
Two solutions. . . this means performance check!! 🙂
Here's 1 million rows of sample data: -
SET NOCOUNT ON;
IF object_id('tempdb..#testEnvironment') IS NOT NULL
BEGIN
DROP TABLE #testEnvironment;
END;
--1,000,000...
October 25, 2012 at 6:47 am
Gohloum (10/24/2012)
OK, I noticed something. My original code pulls from Sunday to Saturday week periods, and includes the most recent sunday...
October 24, 2012 at 1:36 pm
Gohloum (10/24/2012)
Trying your latest solution. Got a Incorrect syntax near keyword 'VALUES'
Are you using SQL Server 2005 ?
If so, change the solution to this: -
--== START OF SOLUTION ==--
DECLARE...
October 24, 2012 at 10:15 am
Gohloum (10/24/2012)
October 24, 2012 at 10:13 am
Sorry, didn't see the join in there so provided a part solution.
Try this instead: -
--== START OF SOLUTION ==--
DECLARE @WEEKS INT;
SET @WEEKS = 12;
WITH CTE(N) AS (SELECT 1 FROM (VALUES(1),(1),(1),(1),(1),(1),(1),(1),(1),(1))a(N)),
CTE1(N)...
October 24, 2012 at 10:02 am
Sorry, took a bit longer than I expected.
I think you're after something like this: -
DECLARE @WEEKS INT;
SET @WEEKS = 12;
WITH CTE(N) AS (SELECT 1 FROM (VALUES(1),(1),(1),(1),(1),(1),(1),(1),(1),(1))a(N)),
CTE1(N) AS (SELECT 1 FROM...
October 24, 2012 at 9:51 am
Viewing 15 posts - 421 through 435 (of 2,007 total)