Viewing 15 posts - 751 through 765 (of 13,877 total)
Why not just make a backup of demo_1 and restore it over the top of demo_2?
November 20, 2023 at 1:32 pm
Something like this?
DROP TABLE IF EXISTS #SomeData;
CREATE TABLE #SomeData
(
SomeCol NVARCHAR(MAX)
);
INSERT #SomeData
(
SomeCol
)
VALUES
('{"changedAttributes":[{"logicalName":"line1","oldValue":"street1","newValue":"street2"},{"logicalName":"city","oldValue":"City1","newValue":"City2"},{"logicalName":"phone","oldValue":"123","newValue":"345"}]}');
SELECT sd.SomeCol,oj2.*
FROM #SomeData sd
CROSS APPLY OPENJSON(sd.SomeCol) WITH (changedAttributes NVARCHAR(MAX)...
November 20, 2023 at 11:53 am
Add a derived column in the dataflow and set its value to the variable. It will be available for mapping.
November 17, 2023 at 11:31 pm
Fed? Brain? I hate to think what you would call me.
November 16, 2023 at 4:51 pm
OK, my point was that if the Code is already a candidate key in a table, why not throw away the Id and make Code the clustered PK? Could give...
November 15, 2023 at 5:37 pm
Do the Id columns in these tables perform any useful function? Based on what you've posted so far, it looks like there's an argument for removing them ... or maybe...
November 15, 2023 at 5:23 pm
A WHILE loop is a really slow way of generating this. Instead, consider using something like this, which does it fast! (Once again, thanks to Jeff Moden for the base...
November 14, 2023 at 11:02 pm
This is likely to be a permissions issue. The user executing the command (which will be the SQL Agent service user, by default) needs appropriate access to all of the...
November 14, 2023 at 2:22 pm
Do you receive any error messages?
November 14, 2023 at 11:25 am
Thanks so much. Can this be done in SSIS? Like the splits
Yes. In SSIS, you have access to C#, allowing very sophisticated levels of manipulation to be accomplished. But...
November 12, 2023 at 9:57 am
Thanks, Jeff. I made the assumption that the OP did not have a table 'TBL' containing a single column 'COLUMN1' and therefore that the addition of a suitable PK would...
November 10, 2023 at 11:56 am
Another version:
SELECT t.COLUMN1
,STRING_AGG (s.Item, ',') WITHIN GROUP(ORDER BY s.ItemNumber DESC)
FROM @TBL t
CROSS APPLY
(SELECT * FROM dbo.DelimitedSplit8K (t.COLUMN1,...
November 10, 2023 at 10:57 am
Frederico, Des thank you both for the examples. Taught me something new … appreciated.
November 10, 2023 at 10:52 am
If it was included then yes. Sorry, this is a different data set I put together. But the idea, process, and everything about the data is very similar.
Please script...
November 10, 2023 at 10:20 am
Also, if the %of duplicates is higher than the % of singles, then it may be better to copy the singles into a new table and switch out the...
November 10, 2023 at 10:10 am
Viewing 15 posts - 751 through 765 (of 13,877 total)