Skip to content
Advertisement

Tag: where-clause

setting time range in SQL Developer

I am working on a dataset that contains car accidents and their time of occurrence. (the data set exists in SQL Server under the name accident). I have a column that is in date format. I would like to extract the time from the column. Then add a new column called lightining_period label the time as daytime or nighttime. My

tweaking stored proc

I have a stored proc that gets called with a parameter. I would like to check what the PARAM @Value is, and depending on the value, I want to add a part of a WHERE clause if it equals to a certain value. Let’s say the proc looks like this: This is a much simpliefied code, my WHERE clause for

Comapring DATE_ADD with NOW not working on MySQL

I’ve try to compare an DateTime in MySQL. The table is to check locked users. For sample, an User will be locked for 1 Day at the DateTime 2020-04-09 14:51:32: until is the datetime time_created with added days from locked_time. Here is the Result of entries: The calculation (time_created with added locked_time with the result 2020-04-10 14:51:32) is correctly. But

Advertisement