I created a dynamic sql query from a tutorial which said always write the where clause like this " where 1 = 1 "...so the where clause will always work.However, this does work as long as you AND any additional search params.Once I modified the query to use OR as well. I always received too much informationsuch as thisselect c.ConID, c.ContractNum, c.PoPStart, c.PoPEnd, p.ProgramName, j.ProjName from Contracts c inner join Programs p on c.ProgramID = p.ProgramID inner join Project j on j.ProjID = c.ProjID where 1 = 1 or c.ConID > 50 or c.PoPStart > '2009-10-01' order by c.ConID asc
results in too much information returned.Is there any easy way to fix this? Thanks,