Viewing 15 posts - 2,431 through 2,445 (of 4,087 total)
Yes, use a different approach. Either shred the XML and make your adjustments on the shredded data or use .modify() to modify your XML.
Since you haven't provided sample data...
August 23, 2016 at 11:22 am
Why aren't the last buys from 2016-08-18 17:38:40.000 and 2016-08-17 15:03:52.000?
Drew
August 23, 2016 at 9:54 am
Francis Twomey (8/22/2016)
INSERT INTO item_relation_table
(parent__id,
child__id,
relation)
SELECT xm.1_id, xm.2_ID,
'A',
from tablexm xm
where xm.1_id != xm.2_ID and
exists(select 1 from item ip WHERE ip.mfg =...
August 22, 2016 at 3:45 pm
Depending on what your statuses are, you may not even need a case expression. If your only statuses are ADD and DISCHARGE, then you can just use MAX(status) <...
August 22, 2016 at 3:31 pm
Jacob Wilkins (8/22/2016)
drew.allen (8/22/2016)
COUNT(CASE WHEN...
August 22, 2016 at 3:21 pm
COUNT will work as an aggregate if you return a NULL in the proper cases. COUNT() may not perform the best, but it will work.
COUNT(CASE WHEN status='Discharge' THEN 1...
August 22, 2016 at 1:24 pm
You should post what you've already tried. It's going to be easier for you to understand if it's just a minor change in your existing code rather than having...
August 22, 2016 at 1:14 pm
Jacob Wilkins (8/22/2016)
Something like this:
[column] LIKE '['+@a+'-'+@b+']%'Cheers!
This will only work if you pass in single characters as your parameters. Given that you've defined your parameters as VARCHAR(50), it seems...
August 22, 2016 at 12:00 pm
And if you're looking for a range of values between the two parameters, it becomes a bit tricky. For instance, if your parameter values are 'A' and 'C', you'll...
August 22, 2016 at 11:51 am
WayneS (8/22/2016)
drew.allen (8/17/2016)
August 22, 2016 at 9:27 am
mister.magoo (8/21/2016)
WITH CTE AS
(
SELECT
seq
, ROW_NUMBER() OVER
(
...
August 22, 2016 at 8:44 am
This will also work.
UPDATE #test
SET Flag = @Flag
WHERE Id = @Id
AND COALESCE(Flag, ~@Flag, 0) <> COALESCE(@Flag,...
August 19, 2016 at 8:13 am
ChrisM@Work (8/19/2016)
UPDATE #test
SET Flag = @Flag
WHERE Id =...
August 19, 2016 at 7:45 am
I like the following method, particularly when you are comparing multiple columns.
UPDATE #test
SET Flag = @Flag
CROSS APPLY (
SELECT Flag
...
August 19, 2016 at 7:35 am
This is even in the Microsoft documentation.
Using decimal, float, and real Data
August 18, 2016 at 4:20 pm
Viewing 15 posts - 2,431 through 2,445 (of 4,087 total)