Viewing 15 posts - 31 through 45 (of 65 total)
Thanks for the replies everyone! That XML-function is really really great.
Didn't know that XML was actually order-"specific", I remember ridiculing some systems myself that required to send XML tags in...
March 19, 2015 at 11:52 am
This is part of SQL Unit-tests, so need a TSQL solution :/
HASHBYTES will give different results for following two xmls:
<xml>
<attribute1>1/<attribute1>
<attribute2>2/<attribute2>
</xml>
<xml>
<attribute2>2/<attribute2>
...
March 19, 2015 at 7:18 am
That's because Short-Sleeved is > Short, so it doesn't satisfy the <= 'Short' condition
March 1, 2015 at 12:33 pm
Your XML-SQL is too complex. It's better to do it by following "pseudo"-code:
SELECT 'field'
, another_field
-- ( starts a new XML level
, (
...
February 28, 2015 at 11:54 am
Aha, it does something like that:
[Expr1010] = Scalar Operator(CONVERT_IMPLICIT(int,#t.[parcelno_available] as [tpa].[parcelno_available]-[Expr1011],0))
Right before the insert into the #t-table.
and parcelno_available is well above INTs value.
This cast doesn't happens when i just select...
February 28, 2015 at 10:40 am
Hi,
Could you explain it a bit more? 🙂 Not sure i follow it exactly
February 28, 2015 at 5:36 am
I usually do something like this:
SELECTSetId, CHECKSUM_AGG(CHECKSUM(ItemCode)) ch
FROMSetsItems
GROUP BY SetId
ORDER BY ch
If you're **really** unlucky you might get a false positive because CHECKSUM isn't perfect, but i doubt it. You...
February 28, 2015 at 4:15 am
Hi,
Yes, i saw the solution. The reason i'm stubborn is that it works fine if i call different inline TVFs inside each other, as i demonstrated with my second script.
If...
October 10, 2014 at 10:22 am
Sean Lange (10/10/2014)
October 10, 2014 at 8:55 am
Nah, it works fine, if the function name in the "nest" is different:
IF OBJECT_ID('FN_REPLACE', N'IF') IS NOT NULL
DROP FUNCTION FN_REPLACE
GO
IF OBJECT_ID('FN_REPLACE2', N'IF') IS NOT NULL
DROP FUNCTION FN_REPLACE2
GO
CREATE FUNCTION dbo.FN_REPLACE
(
@pString NVARCHAR(MAX)
,@pReplaceSegment...
October 10, 2014 at 7:30 am
I don't actually reference the function inside itself.
Script #2 is what i try to run outside of the created function body.
The function definition is still the same as in Script...
October 10, 2014 at 7:17 am
It can make wonders in performance to change the Scalar function into Inline table-valued function (if the function is simple enough that is).
October 10, 2014 at 3:07 am
Why not have a UNION of two selects?
One that selects column names for the first row and another that selects actual data?
October 11, 2013 at 4:07 pm
I've noticed when you have code like:
DECLARE @sql NVARCHAR(MAX)
SET @sql = '... very long sql' + CAST(@someparam AS VARCHAR) + 'continuation of long sql' + '...'
And...
September 25, 2013 at 11:55 am
Viewing 15 posts - 31 through 45 (of 65 total)