Since session("id") does not change per row in your table, I don't
understand why this has to be part of the SQL Statement at all.
What are the possible values for status? 0 and 1 only, or are there other
values as well?
What do you want to happen when session("id") = "" ?
(Reverse address to reply.)
"HelLind" <u8712123cc.nctu.edu.tw> wrote in message
news:9a6fe908.0408061238.7f1d2076posting.google.c om...> Hello,
> Is such select sql statment allowed?
> " SELECT * FROM Photo_SubCategory Where (Status = 1 And
> Session("id") <> "") or (Status = 0 And session("id") <> "" )"
> Status is a field in the table.
> Basically I want to selct a record that satisfy when the field Status
> = 1 and session("id") <> ""
> Or how do i achieve it ?