Viewing 15 posts - 46 through 60 (of 253 total)
The solution for anyone, who might run into the same issue is to place double quotes on the element with the dot, so it works perfect for me now, thank...
September 30, 2020 at 3:12 pm
I can't keep on giving answers on moving goal posts. I have shown how you would do this, I will leave it to you to implement.
JSON_VALUE(v.value, '$.fields.System.State.newValue')
will not...
September 30, 2020 at 2:54 pm
I have added more elements to "fields" complex one and seems I can receive the results without CROSS APPLY, but not those with the dot
DECLARE @v_Json NVARCHAR(MAX)...
September 30, 2020 at 2:43 pm
Providing I have implemented your suggestion correctly as per my code below, I receive no value for System.State either
DECLARE @v_Json NVARCHAR(MAX) = N'{
"count": 56,
"value": [{
"id": 1,
"workItemId": 1234,
"fields":...
September 30, 2020 at 2:03 pm
Sorry for Oracle, yes, Execution Plan. I am not suggesting anything, yet asking for your opinion.
September 30, 2020 at 1:47 pm
CROSS APPLY will affect show plan significantly on large JSON files.
September 30, 2020 at 1:40 pm
I think CROSS APPLY in this case is overkilling, as there is only one "fields" complex element per id. What do you think?
September 30, 2020 at 1:36 pm
Following your correct comment, below is fully working SQL example for your perusal:
DECLARE @v_Json NVARCHAR(MAX) = N'{
"count": 56,
"value": [{
"id": 1,
"workItemId": 1234,
"fields": {
"System.Id": {
"newValue": 1234
},
"System.State": {
"newValue": "New"
}
}
},
{
"id": 2,
"workItemId":...
September 30, 2020 at 1:34 pm
The JSON you've given us isn't even valid. If we take the time to format it properly, there's plenty of problems.
{
"count": 56,
...
September 30, 2020 at 1:19 pm
Hi,My command is : EXEC Master.dbo.xp_DirTree 'D:\Backups\',1,1And I have one file in the directory, but the out is : (0 rows affected)I am running this on SQL Server 2017...
August 27, 2020 at 7:16 pm
Thank you, Jeff!
August 15, 2020 at 7:51 pm
I need some basic help, which I will then try to extend, please.
Since very few people ever come back to tell us, I'll make you a deal... ...
August 15, 2020 at 3:42 pm
Thank you All!
Steve, apologies - I had no intention to offend you. I have looked into fnTally / the link you have kindly provided.
Much obliged.
August 15, 2020 at 12:16 pm
Thank you, Steve
Sadly none of your examples works for me from the Studio - getting various error messages.
August 14, 2020 at 9:48 pm
I would expect to see Bertha and Betty (doesn't matter the order nor if it is all lower / UPPER case).
Thank you.
August 14, 2020 at 8:11 pm
Viewing 15 posts - 46 through 60 (of 253 total)