coalesce Error


please input

error: conversion failed when converting datetime character string  .... close coalesce

 

select

 

 

 

(t1.first_name + ' ' + t1.last_name + '('+ t1.work_status + ')')

name

 

 

 

,

t1.eid

 

 

 

,

t1.csgid

 

 

 

,

t1.ccfrole

 

 

 

,

t1.ccflocationid

 

 

 

, t1.modifydate

updated

 

 

 

--, t1.logindate

 

 

 

--, t2.lastlogin

 

 

 

,coalesce(coalesce(t2.lastlogin, t1.logindate),'never')as [logged in

]

 

 

 

--, t1.ccflevelid

 

 

 

--, t2.securitylevel_id

from

 

 

ccfuser

t1

left outer join

 

 

user_tbl

t2

on

 

 

t1.first_name =

t2.first_name

and

 

 

t1.last_name = t2.last_name

where

 

 

 

t1.ccflevelid in (2, 4) , t1.deleted =

0

all choices in coalesce have same datatype.  use whatever db function available convert 1st 2 choices date string.



More discussions in Database Access


adobe

Comments

Popular posts from this blog

Error compiling for board Arduino/Genuino Uno.

Installation database is corrupt

RFID-RC522 with Arduino Pro Micro project. Error on the code?