You didn't metion waht language you are using, i.e.vbscript or staright sql,
but I do know that values of variables need to be enclosed in single quotes
depending on how your sql was loaded etc.
The query anaalyer is a great way to test your statements. Use a write
statement for the sql text so it displays on your page, then copy and patse
into the qeury analyer.
I do know that ewhen you use sql with vbscript, it isslightly different
in some of the syntax from the on-line books. For example, "Mastertab as a ,
details as b etc. doesn't like that at alll