where 0 = 0
where 0 = 0
(OP)
An old program has this statement
select * from db1 where 0 = 0
Why "where 0 = 0" is needed?
select * from db1 where 0 = 0
Why "where 0 = 0" is needed?
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS Contact USThanks. We have received your request and will respond promptly. Come Join Us!Are you a
Computer / IT professional? Join Tek-Tips Forums!
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting Guidelines |
|
Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.
Here's Why Members Love Tek-Tips Forums:
Register now while it's still free!
Already a member? Close this window and log in.
RE: where 0 = 0
Hope This Helps, PH.
FAQ219-2884: How Do I Get Great Answers To my Tek-Tips Questions?
FAQ181-2886: How can I maximize my chances of getting an answer?
RE: where 0 = 0
Consider the following pseudocode:
CODE
If CheckBox1 Is Checked Then sql = sql + " AND Col1 =" + TextBox1
If CheckBox2 Is Checked Then sql = sql + " AND Col2 =" + TextBox2
RE: where 0 = 0
to append OR conditions, however, you'd use WHERE 0=1
r937.com | rudy.ca
Buy my new book Simply SQL from Amazon
RE: where 0 = 0
CODE
WhereClause = "WHERE " & SubClause
Else
WhereClause = WhereClause & " AND " & SubClause
End If
RE: where 0 = 0
heck, even mysql can do that
your if/else code block would have to be applied to every form field
too many trees, not enough forest
r937.com | rudy.ca
Buy my new book Simply SQL from Amazon