Lloyd wrote:

select a from mytable where (b=0) and

and this is a syntax error.
you're not saying which language you're using.

in Python a common solution looks like this:
clauses = []
# add strings to the clauses list, like
clauses.append('(b=0)')
# join the parts using appropriate glue
where = ' AND '.join(clauses)

sometimes I do need something like what you call "an empty clause"...
some engines accept 'TRUE', others don't know that literal.
I find this quite convenient:
'0=0'

hth...

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to