Jump to content

sql help


vj5

Recommended Posts

I have field named asof which is a date field. I am doing a search with date start and date end which both of the values comes from asof field. Now, how will I query the database with one field and two variable names?Below is the query when echoed:

SELECT UCASE(ph.groupno) as groupno, ph.name, ph.asof as asofstart, p.managing_broker_id, b.FirstName, b.Lastname, ph.base, ph.current, ph.`gro/decline` FROM `dbBkrPol`.Policies p INNER JOIN `dbBkrPol`.persHorizon ph ON p.GroupNumber = ph.groupno INNER JOIN dbBkrPol.Brokers b ON p.managing_broker_id = b.PersonID where 1 AND `groupno` LIKE '%243Y0%' AND `name` LIKE '%scarrone%'  AND `asof` LIKE '%12/2007%' AND `asof` '%12/2008%' ORDER BY `asof` DESC

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...