Link to home
Start Free TrialLog in
Avatar of badr s
badr s

asked on

error problem with 1582 Incorrect parameter count in the call to native function 'ISNULL'

hello everyone
i have 2 tables one (visits) and other one (patients) with relationship by mysql (patients) is with PK as patients.pid and visits.pid as index
and i wanted to use code in my vb.net app to get the last datetime record to check the patient if still inside the hospital admitted or discharge
so far i have this code with help of you guys
SELECT a.pid,MAX(ISNULL(b.sdat,'1901-01-01')),MAX(ISNULL(b.edat,'1901-01-01')) from patients a left join visits b on a.pid=b.pid Where ddatediff(now(),b.edat) <=365 group by a.pid

Open in new window

but when i execute in sql builder using php myadmin  or another app i get error
(1582 - Incorrect parameter count in the call to native function 'ISNULL')
i tried to find out the error cause but no luck until now
ASKER CERTIFIED SOLUTION
Avatar of CompProbSolv
CompProbSolv
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of badr s
badr s

ASKER

thank you so much  bro worked :)  
i will just try next step to put in if condition in my vb.net i hope i can figure it out
thank you again