Supermetrics Support Forum

Unable to Convert SQL query in x++ for RDP Class?

Hi Everyone,

I have written a query in SQL (report builder ) and it is working fine but now i want to use this query in x++ RDP class for SSRS.

below is the sql query :

x-----------------------x-------------------------------------------------------x

from hcmworker

inner join DirpartyTable on hcmworker.PERSON = DirpartyTable.RECID
inner join dirPartyLocation on dirPartyTable.RecId = dirPartyLocation.Party
inner join HcmPositionWorkerAssignment on HcmPositionWorkerAssignment.Worker = hcmworker.RECID

inner join HcmPositionDetail on HcmPositionWorkerAssignment.Position=HcmPositionDetail.Position


inner join dimattributeomdepartment on dimattributeomdepartment .RECID=HcmPositionDetail.department


inner join logisticsLocation on dirPartyLocation.Location = logisticsLocation.RecId


inner join hcmemployment on hcmworker.recid=hcmemployment.worker
left outer join  assettable on hcmworker.personnelnumber= assettable.personnelnumber

--and LOGISTICSELECTRONICADDRESS.LOCATOR LIKE '%computers%'






where HcmPositionDetail.VALIDFROM <= getdate()
and HcmPositionDetail.VALIDTO >= getdate()
and hcmemployment.VALIDTO >= getdate()
--and hcmemployment.VALIDFROM >=getdate()

and ASSETTABLE.ASSETID IS NULL 
OR assettable.assetgroup='computers'
and HcmPositionDetail.VALIDTO >= getdate()

ORDER BY hcmworker.PERSONNELNUMBER DESC

x-----------------------x-------------------------------------------------------x

Please help me in converting this query into X++.

i got stuck on how to handle getdate() and NULL query.

thank you

Login to post a comment