SQL Server 4004 error for YII framework -
below query works on sql server 2012 on database, yii returns 4004 error linux box.... freetds issue? has configuration same query runs on local machine perfectly.... on live (linux box centos, freetds mssql), below error cdbcommand failed execute sql statement: sqlstate[hy000]: general error: 4004 general sql server error: check messages sql server [4004] (severity 16) [(null)]. sql statement executed was:
yii 1.1 used....
with data ( select e.sitekey, f.sitename, d.hrdeptkey,d.hrdeptname, b.hrsdkey,b.hrsdname, c.empsapid subdeptheadsapid, concat(c.empfirstname,' ',c.empmiddlename,' ',c.emplastname) subdeptheadname, l.empsapid deptheadsapid, concat(l.empfirstname,' ',l.empmiddlename,' ',l.emplastname) deptheadname, h.countrykey, h.countryname, i.compkey, i.compname, j.businesstypekey, j.businesstypename hrmastersubdepartment b left join rolemappingemployee on (a.subdeptkey=b.hrsdkey , a.rolekey=66 , a.subdeptkey > 0 ) left join masteremp c on a.srkey=c.srkey left join hrmasterdepartment d on b.hrdeptkey=d.hrdeptkey left join hrmapping_subdepartment_site e on (b.hrsdkey=e.hrsdkey , e.isactive=1) left join mastersite f on e.sitekey=f.sitekey left join mastercity g on f.citykey=g.citykey left join mastercountry h on g.countrykey=h.countrykey left join mastercomp on g.countrykey=i.countrykey left join masterbusiness j on j.businesstypekey = d.businesstypekey left join rolemappingemployee k on (d.hrdeptkey=k.deptkey , k.rolekey=95 , k.deptkey > 0) left join masteremp l on k.srkey=l.srkey ( b.hiretilldate > convert(date, getdate()) or b.hiretilldate null) , f.sitekey not null ) select distinct u.hrsdkey, u.hrsdname, u.subdeptheadsapid, u.subdeptheadname, u.sitekey, u.sitename, u.hrdeptkey, u.hrdeptname, u.countrykey, u.countryname, u.compkey, u.compname, u.businesstypekey, u.businesstypename, stuff(( select ','+d.deptheadname data d d.hrsdkey = u.hrsdkey xml path('') ), 1, 1, '') deptheadname, stuff(( select ','+d.deptheadsapid data d d.hrsdkey = u.hrsdkey xml path('') ), 1, 1, '') deptheadsapid (select * data) u
i tried below link no avail...
Comments
Post a Comment