Skip to content

SQL comparing date

I want to compare the current date with a date from a database table. This code: DATE_FORMAT(dt,’%y-%m’) gives me a date like this 2020-10 and i want that this code: DATE_ADD(CURRENT_DATE, INTERVAL – …

Add a counter based consecutive dates

I have an employee table with employee name and the dates when the employee was on leave. My task is to identify employees who have takes 3 or 5 consecutive days of leave. I tried to add a row_number …

Reporting off of an in memory data store? [closed]

I need to generate reports based on a dataset pulled from a third party API, but I can’t store the data on disk. (If not storing the data were not a requirement, I would be storing the data in a …

SQL Server string parse?

DROP TABLE IF EXISTS #test CREATE TABLE #test ( line VARCHAR(500) ) INSERT INTO #test (line) VALUES (‘1194125598,,191,3.95,194.95,Loan Payment,999999999,2779,”Melinda”,”Meeken&…

Node-MySQL unable to insert TIME

I am trying to build an API in Express.JS with an MySQL-Server running in the background. One of the tables contains a column with a type of TIME. When trying to insert into that table however, I get {…