REPLACE in query

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

REPLACE in query

Jad El Omeiri
Hi,

Does anyone know how I would be able to do such a query in Ofbiz:


SELECT dbo.tblJobs.JobID, REPLACE(dbo.tblProperties.PostCode, ' ', '') AS PostcodeNoSpaces

FROM dbo.tblJobs INNER JOIN dbo.tblProperties ON dbo.tblJobs.PropertyID = dbo.tblProperties.PropertyID

WHERE dbo.tblJobs.JobID = jobId AND (REPLACE(dbo.tblProperties.PostCode, ' ', '') = postcode)


I know I can use a View-Entity for the JOIN.
BUT what about the REPLACE? can I do it in alias or something like that?
or do I have to call a java service for getting to what I need?

Thanks,
Jad El Omeiri