Viewing 15 posts - 2,881 through 2,895 (of 3,957 total)
You need to call DelimitedSplit8K (not dbo.Table1) as I did. Find it in the link I provided.
September 2, 2012 at 10:59 pm
Shadab Shah (9/2/2012)
dwain.c (9/2/2012)
Why don't you just use UPDATE (if all 31 rows are present) or MERGE (if they are not)?
But that means i have to write update 31 times....
September 2, 2012 at 10:27 pm
Why don't you just use UPDATE (if all 31 rows are present) or MERGE (if they are not)?
September 2, 2012 at 9:29 pm
Let me explain a little further about the CROSS APPLY.
CROSS APPLY (
VALUES (Column1a, Column2a, Column3a, Column4a)
,(Column1b, Column2b, Column3b,...
September 2, 2012 at 9:04 pm
You didn't say what's in CLocation.Text. Is that also a delimited string with the same number of values? Or perhaps just a single value? Or some combination?
September 2, 2012 at 8:10 pm
Try changing:
AND
companyid IN(@CompanyID)
To:
AND
companyid IN(SELECT item FROM dbo.DelimitedSplit8K(@CompanyID, ','))
Where DelimitedSplit8K can be found here:
September 2, 2012 at 7:48 pm
Dwight617 (9/2/2012)
INSERT INTO [Table]
SELECT 1234, 1, 'True', 'False', 'False', 2, 'False', 'False', 'False', 3, 'True', 'True', 'True', 4, 'False', 'False', 'False'
One other complication, looking to filter...
September 2, 2012 at 7:28 pm
Like this perhaps?
DECLARE @DateTo DATETIME = '20110330', @DateFROM DATETIME = '20100330'
,@CenterNumber INT = 200
SELECT
----- FileHeader ------------------------------------------------------------------
(SELECT
CONVERT(VARCHAR(16), GETDATE(), 120) ...
September 2, 2012 at 7:15 pm
I don't know if this is any lighter or better performing but it's another option:
SELECT *
FROM @NumberTable
ORDER BY RIGHT('000' +
REPLACE(
SUBSTRING(ItemNumber, PATINDEX('%[0-9]%',...
September 2, 2012 at 7:03 pm
You're a bit scant on sample data, but we'll take a stab at it anyway. You can see in this example how to UNPIVOT single or multiple columns, so...
September 2, 2012 at 6:54 pm
I moved the check for ExchangeLock process value = ID earlier in your CASE statement.
SELECT --DeadlockID,
COALESCE(PageLock.Process.value('../../@id', 'varchar(100)'),
...
September 2, 2012 at 6:41 pm
Jeff Moden (8/31/2012)
dwain.c (8/30/2012)
Jeff Moden (8/30/2012)
Please see the following. It's pretty simple to do once you know how...
I was initially expecting to have to use the standard rCTE adjacency...
September 1, 2012 at 5:28 am
Eugene Elutin (8/31/2012)
dwain.c (8/31/2012)
Eugene Elutin (8/31/2012)
draw Mona Lisa using T-SQL (I remember I had seen assembler application which would print out...
August 31, 2012 at 6:50 am
Eugene Elutin (8/31/2012)
draw Mona Lisa using T-SQL (I remember I had seen assembler application which would print out this one using...
August 31, 2012 at 6:22 am
Cadavre (8/31/2012)
dwain.c (8/26/2012)
No +1 for my performance improvements? :crying:
Sorry dwain, but that smacks way too much of the stackoverflow method for answering questions. Since I hate the atmosphere over there,...
August 31, 2012 at 5:41 am
Viewing 15 posts - 2,881 through 2,895 (of 3,957 total)