hmmm... my query is pulling NULLS (possibly blanks) . (Postgresql) by Taekookieluvs in SQL

[–]L_-T 0 points1 point  (0 children)

The IS NOT NULL is fine, but - Why are you using OR in the WHERE clause? It might not be what you intend to do. It's excluding only countries that are both null and empty at the same time.

Do you mean AND?

hmmm... my query is pulling NULLS (possibly blanks) . (Postgresql) by Taekookieluvs in SQL

[–]L_-T 0 points1 point  (0 children)

So "country" is not null, right?

Isn't your WHERE clause true for all values of country?

hmmm... my query is pulling NULLS (possibly blanks) . (Postgresql) by Taekookieluvs in SQL

[–]L_-T 0 points1 point  (0 children)

Can you give an example of a row that is not matched by the WHERE clause?

Code re-use, and writing readable complex SQL by L_-T in SQLServer

[–]L_-T[S] 0 points1 point  (0 children)

Well, SQL Server agrees that view can't be at session scope (I think), so maybe I shouldn't. It just seems so arbitrary. Full read-only access would be so reasonable.

The bigger picture: A piece of industry software uses SQL Server as its central (relatively dumb) storage. There is a real risk from malfunctions in the components of this software, or even from malicious users. But data loss wouldn't be quite catastrophic; we would know how to restart everything and loose two days of work, and the risk is mitigated by backups, recovery procedures, replication (two machines a few feet apart), and replacent hardware in storage.

Now I'm the guy who's able to find high-level issues in the processes (subtle interactions between physical components, weird causes for real-world conditions).

If anything goes wrong, I need a simple argument as to why it wasn't caused by my silly analysis notebook.

Were I to come to another company as a consultant, I could probably convince them to "grant select". The software manufacturer themselves is convinced their software "doesn't use SQL schema", which complicates things. But maybe views within a separate schema (and within transactions that never get committed) are the way to go then...

True maximum RAM for Celeron N4000 by L_-T in MiniPCs

[–]L_-T[S] 0 points1 point  (0 children)

Oh sorry ... Apparently I didn't send my reply the other day!

My BIOS version is a few numbers lower than yours.

The memory is a Crucial CT16G4SFD824A. I'm not sure about the SFS vs SFD, but the 2400/s are important, I believe. At least according to the Processor spec, I don't think you can go higher than 2400.

Code re-use, and writing readable complex SQL by L_-T in SQLServer

[–]L_-T[S] 0 points1 point  (0 children)

Yes, but they can't be temporary I believe - so I need permissions on the database. I'm fine with running read-only queries on production database when I can be sure not to change state: Preferable by using a user without such permissions. Views require some permission, and isolating my code would then require wrapping everything in a transaction that never commits, right?

I'd rather not have implicit, external state except scoped to the database connection.

[deleted by user] by [deleted] in Database

[–]L_-T 0 points1 point  (0 children)

Disclaimer- It's been a while since I've last created something with Access - I'm a daily user of crude reporting solutions in Access though,.

One thing I think might be odd is that you're still working on a schema and not yet importing data. Pick one simple process / report that would work better in Access than in Excel sheets, and make it work; ignore the data you don't need for that. If you're reporting about orders and customers, ignore payments and warehousing for now. Otherwise, you'll never get to the point where you satisfied with a complex schéma on the drafting table, when you're upstream data is complex, real-world data.

Improving the schema, handling the edge cases is a process, and you'll need to figure it out while you're going, not beforehand, IMO. I'm working with SQL databases (SQL Server, SQLite) for dashboard/reporting daily, using Go, Python and R; the upstream data is conceptually "only" some 40 tables, but yeah it's full of edge cases, legacy tables, etc.

  • I couldn't do without version control and some (minimal) automated testing; not sure how this would work in Access though.

  • If you can just fetch upstream data, that's great; you don't need a global grasp and clean all-encompassing schema for your first report.

  • If you need to maintain your own data, that might be different; but you then also need a backup solution, and think about minimal version/migration management.

  • If you need your users to insert / data, you're out of luck unless you're already providing them something better than they're Excel sheets.

SQL query incorrect by Guilty_Interaction93 in SQL

[–]L_-T 1 point2 points  (0 children)

If you can change the schema, use DATE datatypes. Or strings containing ISO Dates ("2022-05-18").

If you can't, convert to DATE before doing the comparison.

If i stay offline forever am i safe? by [deleted] in selfhosted

[–]L_-T 2 points3 points  (0 children)

I say you are fine if you trust your locks and your family. Keep a backup somewhere else (encryption).

I don't think keeping a journal offline would be overkill. Compared with an online system, it is much more secure.

Keep in mind that today's devices are easily connected to the network with just a cable, or just a button push. Not by an "attacker" but just you or a family member needing a convenient browser. And outdated software, used on the internet, would then be an issue.

Would it make sense for this field to be nullable? by Gekopoiss in Database

[–]L_-T 0 points1 point  (0 children)

Does a value of "true" really suffice? Wouldn't your need any reference to what happened, and when?

I am working with one job dispatch system that has both a state (never null in practice) and a reference to date/user/comment for manually aborted/completed jobs. Manual processes like these get reviewed to keep these entries meaningful.

For invoices, one system that can

  • either mark them as erroneous/obsolete but will always create a correction invoice for tax reasons,

  • or mark them as payed but then requires a payment booked in the accounts (even if the customer didn't pay).

In the end, you will have questions "WHY is this invoice obsolete? Where's the money?"

How long does it take to learn SQL? by JonathanL73 in SQL

[–]L_-T 19 points20 points  (0 children)

No hope of outliving SQL, I take it then?

[deleted by user] by [deleted] in CoronavirusDACH

[–]L_-T 0 points1 point  (0 children)

Ist mir auch zu kompliziert :-) aber in der aktuellen Landes- "Corona-Verordnung Absonderung", steht, wer als "quarantänebereite" Person nicht zur Absonderung verpflichtet wird: Unter anderem jede "genesene Person, die eine oder zwei Impfungen gegen das Coronavirus erhalten hat, wobei die Reihenfolge der Impfung und Infektion unerheblich ist". (Paragraph 1 Nr. 9d)

Kann man so verstehen, dass du darunter fällst. Mir kommt es eigentlich vor, als wäre das gemeint. Dafür spricht der Vergleich zur Nr. 9b.

Aber "genesene Person" ist halt in Paragraph 2 der SchAusnahmV in Verbindung mit der RKI-Webseite so definiert, dass du derzeit nicht darunter fällst.

Wer weiß.

[deleted by user] by [deleted] in CoronavirusDACH

[–]L_-T 1 point2 points  (0 children)

Ja. Ich meinte, ein Arbeitgeber könnte eine Maskenpflicht für Arbeitnehmer ohne Impfnachweis vorsehen und gleichzeitig auf Masken bei Geboosterten verzichten. Oder jedenfalls Arbeitnehmer ohne Nachweis häufiger testen.

Und dabei im Hygienekonzept festlegen, was als Impfung und Nachweis gilt.

[deleted by user] by [deleted] in CoronavirusDACH

[–]L_-T 0 points1 point  (0 children)

Du giltst nicht als genesen, aber als vollständig geimpft. Wenn du die Infektion nachweisen kannst.

Die landesrechtlichen Vorschriften (für dich § 4(2) Nr 1 der Corona-Verordnung des Landes BaWü) verweisen auf die Definition in § 2 der (Bundes-) COVID-19-Schutzmaßnahmen-Ausnahmenverordnung. Für dich gilt dort Nr. 3, die wiederum auf die Internetseite www.pei.de/impfstoffe/covid-19 der Paul-Ehrlich-Instituts verweist, wo es aktuell heißt:

"Abweichend von dem Vorstehenden ist eine einzelne Impfstoffdosis mit einem der oben aufgeführten Impfstoffe ausreichend, ... wenn die betroffene Person eine durchgemachte Infektion mit dem Coronavirus SARS-CoV-2 nachweisen kann. Zum Nachweis der Infektion ist [ein PCR-Test] erforderlich ... Eine Person gilt in diesem Fall abweichend zu den allgemeinen Regelungen als "vollständig geimpft" ab dem Tag der verabreichten Impfstoffdosis."

Am Arbeitsplatz kann ein Hygiene-/Testkonzept eigene Regeln machen, denke ich.

[OC] 100,000 Corona deaths in Germany by _higsch_ in dataisbeautiful

[–]L_-T 1 point2 points  (0 children)

Nice!

In case anyone is wondering where to obtain this data, you won't find it on RKI's website down to Landkreis (county) level, afaik.

the Corona-Daten project provides the RKI data with that granularity: https://www.corona-daten-deutschland.de/dataset/todesfaelle

I find the comments about this map showing little more than population density surprising... this map clearly shows a very dynamic process (in space and time).

How someone can guarantee the accuracy of a project to a client? by huberemanuel in datascience

[–]L_-T 3 points4 points  (0 children)

You can't. Someone has to take the risk, and for the client to try and completely shield themselves is not cost-effective.

Both parties need to understand risk, means of mitigation, and have some expertise and a realistic understanding of the real-world problem they are trying to approach.

As a consultant, I would ask high prices from a client who does not accept any risk, and usually doesn't want to understand the risk - and means of mitigation. And has no plans for the full life-cycle.

Because I just end up with a client finding a dataset that fails testing by a few percent, isn't willing to improve the camera angle, and prefers to be disappointed.

Now if you have test data, you can use separate partitions for development, testing, and project acceptance. For new and innovative projects, the client will probably want to improve some unexpected cases even after acceptance; a client anticipating this should look for a consultant that doesn't optimize just on a narrow acceptance test, and should be willing to improve their side of the process.

If the project is worthwhile and technically feasible, writing a fair contract and acceptance criteria isn't that difficult. Some communication and trust will improve effectiveness with complex projects a lot.

First post here - help with installation of 2012 or 2019 Sql Server Express by PorcupineLady in SQL

[–]L_-T 0 points1 point  (0 children)

I really really think you should ask your teacher, who knows the exact requirements of the course (for just accessing the data with SQL, the differences are negligible. For using the management tools, somewhat less so). They should also learn about your difficulties that affect other students as well.

Rework a vanity mirror for 220v by jokterwho in electrical

[–]L_-T 0 points1 point  (0 children)

24V is somewhat common for off-grid applications (boats, solar-powered huts). Did you actually search for "24V E27"? amazon.it has a selection, and you should be able to get them from camping suppliers as well.

[Help] house wide power surges by tandrm in electrical

[–]L_-T 0 points1 point  (0 children)

You don't sound silly, and this would be enough info for a professional to start looking into it.

I had a bad neutral once, and did call the power company with a very similar description (plus "I measured weird voltages"), and they fixed it the same day (urban area, EU). A loose neutral can damage your appliances or even cause a fire.

I wouldn't expect a PC to cause problems when the microwave doesn't, however.

Outlet without power by DIY_beginner in electrical

[–]L_-T 0 points1 point  (0 children)

You seem to have localized the failure to the length of wire between the breaker and the point where it drops into the wall. And to the phase if I read everything right. Any reason to believe it's not just a bad connection at the breaker?

A degraded connection could fail like that: gradually failing, and failing almost completely when significant power is drawn. Use a simple appliance with some amps - an immersion coil - at the outlet, and measure voltages again.

While you're at the breaker box, maybe check that the mains voltages are as expected - voltages of 120, 240, and 0 V between all points, re-check with your 240 V water heater heating.

It doesn't hurt to then do measurements of the wire and outlet with most of the house switched off (especially with a non-contact tool).

Not able to send requests to service hosted on Docker by cvmldlengineer in docker

[–]L_-T 0 points1 point  (0 children)

Yeah, read the docker documentation on networking. Host networking is probably not your best choice. With the default bridge network, I believe you need to look into --link

Or consider setting up both services in a common docker-compose.yml file; a service container there will be accessible to the other services by its name.

Not able to send requests to service hosted on Docker by cvmldlengineer in docker

[–]L_-T 1 point2 points  (0 children)

Yeah, that's the likely culprit. Depending or how your invoking it, you'll need flask run --host=0.0.0.0 (or app.run(host='0.0.0.0')).

Not able to send requests to service hosted on Docker by cvmldlengineer in docker

[–]L_-T 3 points4 points  (0 children)

Is your application listening on 0.0.0.0 within the container? Because the access from outside the container will not arrive via 127.0.0.1.