Viewing 15 posts - 271 through 285 (of 2,462 total)
A general observation is that the overal quality and consistency of Microsoft online documentation is declining. I digress.
Raiserror has been on the chopping block for some time and...
-- Itzik Ben-Gan 2001
May 4, 2017 at 5:11 pm
-- Itzik Ben-Gan 2001
May 4, 2017 at 4:52 pm
I love this series Brian, its very informative. Well done, 5 stars!
-- Itzik Ben-Gan 2001
May 4, 2017 at 6:34 am
Well done. It's always nice to see a RBAR-free, set-based approach to building tables like this. A few things I would change to improve performance:
1. Make all the...
-- Itzik Ben-Gan 2001
May 3, 2017 at 1:47 pm
Because the only text that you are dealing with is alphanumeric, you can change FOR XML PATH(''), TYPE).value('.', 'varchar(max)'), 1, 1, '')
to FOR XML PATH('')), 1, 1,...
-- Itzik Ben-Gan 2001
May 1, 2017 at 4:51 pm
Regarding your first question about the DBA position.. I like try to feel them out to understand if I'm replacing someone or filling a new position and why. Often a...
-- Itzik Ben-Gan 2001
April 28, 2017 at 11:36 am
No problem!
-- Itzik Ben-Gan 2001
April 27, 2017 at 10:24 am
-- Itzik Ben-Gan 2001
April 27, 2017 at 8:31 am
This can be improved but here's one way: WITH piv AS
(
SELECT
AID,
name1 = MAX(CASE [name] WHEN 'LN' THEN [name] END),
name2 =...
-- Itzik Ben-Gan 2001
April 27, 2017 at 7:36 am
Your double quotes don't look right they look like ASCII-148's whereas you want ASCII-34's. Try this:
SELECT
event_xml.value('(./@name)', 'varchar(1000)') as event_name,
event_xml.value('(./data[@name="database_id"]/value)[1]', 'int')...
-- Itzik Ben-Gan 2001
April 26, 2017 at 12:09 pm
-- Itzik Ben-Gan 2001
April 25, 2017 at 8:07 am
-- Itzik Ben-Gan 2001
April 24, 2017 at 4:25 pm
Your first Xpath Expression for Item/ItemNumber is wrong
Instead of N.value('(Item/ItemNumber[1])','int')
You want N.value('(Item/ItemNumber)[1]','int')
declare @packXML XML = '<Pack>
<PackID>1</PackID>
...
-- Itzik Ben-Gan 2001
April 24, 2017 at 3:24 pm
Building off Thom's solution, you could do something like this (note that I can't test this as I don't have an SSRS DB available)
WITH getxml AS
-- Itzik Ben-Gan 2001
April 19, 2017 at 1:27 pm
I'm not sure about this but, for a user to see object info they would need VIEW DEFINITION rights at the DB, Schema and Object level. Does this help?
-- Itzik Ben-Gan 2001
April 14, 2017 at 3:55 pm
Viewing 15 posts - 271 through 285 (of 2,462 total)