Jump to content

Wikipedia:Reference desk/Archives/Computing/2022 February 9

From Wikipedia, the free encyclopedia
Computing desk
< February 8 << Jan | February | Mar >> Current desk >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


February 9[edit]

Windows 10 occasionally crashes unexpectedly[edit]

Hey there!

I'm currently using Windows 10 on my laptop, and it sometimes just says "Your PC Ran into a Problem and Needs to Restart" on a blue screen with a :( face. It gives me error codes on the top-left of the screen, but they go by too fast to read.

This is the reason I hate Windows. Always in perpetual beta, and hard to fix bugs because of the closed-source nature.

Quick Quokka [talk] 16:47, 9 February 2022 (UTC)[reply]

You should disable automatic restart after a BSoD. Ruslik_Zero 20:42, 9 February 2022 (UTC)[reply]
Perhaps the OP's problem with the appearances of the blue screen of death is in the error codes disappearing on Auto Restart, but whether this is indeed the issue is not clear (to me) from the posted statement.  --Lambiam 23:35, 9 February 2022 (UTC)[reply]
You, QuickQuokka, are also in perpetual beta as well, by the way. If you want open source, Linus Torvalds and his creation the Linux kernel are waiting just for you, and it's totally free. Try Debian, Ubuntu, Slackware etc. It's a bit different. Anyway, when Win10 crashes, it creates a file reporting what happened. There are various formats of this file, one of which is called a minidump. To set up Win10 to create a minidump, read this. Then try BlueScreenView, a free utility which reads all the Windows minidumps. Extract the files from the 64-bit zip into e.g. C:\Temp\Bluescreen\, navigate there and double-click on BlueScreenView.exe. The entry at the top is the most recent. It should show you what the most likely cause of the crash is (and all the previous ones as well). Or the file may be completely empty - that's Win10 for you. If there is any info, you could try researching this on the interwebs, or post the result here (a simple copy and paste text job). Microsoft's own Debugging Tools for Windows are a complete pain in the arse. Best of luck. MinorProphet (talk) 08:57, 10 February 2022 (UTC)[reply]
@MinorProphet: WP:NPA, and I'm forced to use it for school. I use Linux for personal reasons on a different partition.
Thanks for the tips though. Quick Quokka [talk] 12:45, 10 February 2022 (UTC)[reply]
@Ruslik0: How do I do that? Quick Quokka [talk] 12:49, 10 February 2022 (UTC)[reply]
@QuickQuokka: I'm very sorry, it wasn't meant to be personal at all: I should have qualified it with "...as we all are." Did you get any results? For disabling restart, try here. They also have a guide to solving BSODs here, and more on minidumps here. MinorProphet (talk) 15:54, 10 February 2022 (UTC)[reply]

Summarizing multiple rows in Oracle SQL[edit]

I need to combine and summarize two different tables (sales and transfers) so that the output returns the time period, the product, and the total number of cases from those two tables. Currently I'm using a UNION ALL function that gets me 95% of the way there but falls down in that if the same product shows up on both tables in the same time period it returns two rows and I need it to combine into one. For example, let's say that we sold 100 potatoes in period 2 and transferred 60 potatoes in that same period, a standard union all would return two rows:

PERIOD_NO SKU_PRODUCT CASES
2 POTATOES 100
2 POTATOES 60

Whereas what I need to get back is:

PERIOD_NO SKU_PRODUCT CASES
2 POTATOES 160

Basically, I need it to be summarized the way that, say, an Excel pivot table would smoothly combine those quantities by period/product. I've got to think there's a way to do this. Searching online hasn't found the kind of thing I'm after, so I'm possibly not using the right terminology. Now, in theory, I could avoid the union all altogether by doing a convoluted outer join of some type with a list of all products and time periods, but that would be really inefficient since those tables would be absolutely massive. Any thoughts? Matt Deres (talk) 17:02, 9 February 2022 (UTC)[reply]

Sample SQL
The following discussion has been closed. Please do not modify it.


SELECT TRX.PERIOD_NO, TRX.SKU_PRODUCT, SUM(TRX.TRANSFER_CASES) as CASES FROM TRANSFERS_TABLE TRX, WHERE TRX.PERIOD_NO <= 10 GROUP BY TRX.PERIOD_NO, TRX.SKU_PRODUCT

UNION ALL

SELECT SLS.PERIOD_NO, SLS.SKU_PRODUCT, SUM(SLS.INVOICED_CASES) as CASES FROM SALES_TABLE SLS WHERE SLS.PERIOD_NO <= 10 GROUP BY SLS.PERIOD_NO SLS.SKU_PRODUCT

One way could be to put a select outside the result of this one. --←Baseball Bugs What's up, Doc? carrots→ 21:31, 9 February 2022 (UTC)[reply]
Basically, you need to do the UNION ALL on the detail records, then calculate the SUM() over the result.--Verbarson talkedits 22:43, 9 February 2022 (UTC)[reply]
Thanks! This was a clear case of over-thinking things. I put the whole thing into a named subquery and then did the group by as suggested. For some reason I had it in my head that I'd have to choose one or the other sets of SKUs, which would leave it broken. Matt Deres (talk) 16:21, 10 February 2022 (UTC)[reply]
Resolved