@Criggie It's not just about dairy though. Another reason that the sheep population dropped, was due to a new regulation in the EU that forbid the import of lamb from just one country. As a result the need for N.Z. lamb dropped on the international market and the N.Z. farmers had to reduce the sheep population.
As a result there was no excess lamb on the N.Z. market and the prices for lamb in N.Z. sky rocketed, which had the side effect that N.Z. families were no longer able to afford a lamb roast on Sunday.
@ErikDarling In some cases yes, but not every byte can be converted in every collation. I suppose it might work if you use a binary collation dbfiddle.uk/AtRbfkzB it's just messy. SUBSTRING works on varbinary there is no reason why STRING_AGG couldn't
@ErikDarling there's an old Aaron Bertrand SO answer that seems to imply convert() can do varbin->base64 conversion but dbfiddle was bombing out on it and i didn't care enough to start my localhost sql server and try it out ¯\_(ツ)_/¯
SUBSTRING has the same naming argument and that's not true for it. There's no reason why you shouldn't be able to aggregate up binary data as varbinary rather than strings.
You take say 6 rows of varbinary(16) and make varbinary(96) out of it.
A chocolate fish or choccy fish is a traditional confectionery item in New Zealand, and in New Zealand culture is a common reward for a job done well ("Give that kid a chocolate fish").Chocolate fish have a conventional fish-shape and a length of 5 to 8 centimetres (2.0 to 3.1 in). They are made of pink or white marshmallow covered in a thin layer of milk chocolate with the ripples or "scales" on the fish created simply by the fish moving under a blower; this slides the unset chocolate back, creating the illusion of scales on the fish. Several manufacturers make the fish; the most well-recognised...
As I mentioned in my other answer, it is also possible to do this using a temp table. This is again likely more efficient and easier than using a recursive CTE.
Note that the following solution is set-based where possible. The number of loops is only up to the max depth of the tree, not for each ...
> The query optimizer recognizes that this pipelined update plan is vulnerable to the Halloween Problem, and introduces an Eager Table Spool to prevent it from occurring. There is no hint or trace flag to prevent inclusion of the spool in this execution plan because it is required for correctness.
There - fixed this for you https://dbfiddle.uk/fby8T1Pa
@Zikato Yes appears so, well obvs if you introduce a blocking operator it won't need the spool. Point is to avoid it altogether: the child rows cannot be the same as the parent rows, but can't persuade the compiler of this fact.