Search
 
SCRIPT & CODE EXAMPLE
 

SQL

MySQL IF without else

SELECT * FROM callback LEFT JOIN agent ON callback.agent_ID=agent.agent_ID 
	LEFT JOIN contact ON callback.contact_ID=contact.contact_ID WHERE callback.agent_ID =118
	AND DATE(callback.cb_dt) =curdate() 
    and Hour(time(callback.cb_dt)) <= Hour(time(UTC_TIMESTAMP()))
    and 
	(if(Hour(time(callback.cb_dt)) = Hour(time(UTC_TIMESTAMP())),
     minute(time(callback.cb_dt)) < minute(time(UTC_TIMESTAMP())) and
    cb_IsDeleted=0 ,cb_IsDeleted=0))
	and callback.isCalled=0;
Comment

PREVIOUS NEXT
Code Example
Sql :: creating directory /var/lib/postgresql/data ... initdb: error: could not create directory "/var/lib/postgres/data": Permission denied 
Sql :: sql express database size limit 
Sql :: PGSQL dynamic table name 
Sql :: 2020 new year 
Sql :: How to pass list as parameter in SQL query 
Sql :: dynamic where clause in sql server stored procedure 
Sql :: how to check table in postgresql from terminal 
Sql :: C# get column name of sqlreader 
Sql :: select nth row in mysql 
Sql :: azure sql server check foreign key 
Sql :: having all mysql 
Sql :: get rows from 1 table with other table empty mysql 
Sql :: mysql db dump restore max file size issue 
Sql :: check constraint is violated 
Sql :: mysql does sentance contain word 
Sql :: SQL Aliases with COUNT() 
Sql :: Aktor yang pernah terlibat lebih dari 3 film di sql 
Sql :: sql server separar numeros por comas miles 
Sql :: bitmap join index 
Sql :: how to reset mysql table auto_increment 
Sql :: SQL LEFT JOIN With AS Alias 
Sql :: select-groups-of-row-only-having-specific-value 
Sql :: funktion LOWER/UPPER sql 
Sql :: sql column as header 
Sql :: mysql primary vs unique 
Sql :: tabular function in sql server 
Sql :: how to check table engine in mysql 
Sql :: SQL: find gap in sequence 
Sql :: select from 3 tables one is empty 
Sql :: sqlite 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =