Hi I have a crystal report with a query that can have 'multiple' or 'no' 'where' clauses,
For e.g. the query can be
select * from tableA or
select * from tableA where ID={?ID} AND name={?name}
What is the best and recommended way to write such a query so it can accommodate the dynamic where clauses?
I know about select * from tableA where 1=1 {?parameter}
and I pass the parameter like
"AND id=1 AND name='john'
But is this approach the right way? I read it causes performance problems. Please advice as necessary.
Thanks, Mike.