:eek: I am sorry because i am in a hurry and in a haste to solve this error hence i write my words in short form.
Well, i will translate my message again:
I would like to select records which userStatus' values is something and not null or empty strings.
I've got a table with a userStatus column, this column is stored with statusID and the values in this column, userStatus, are either numbers or nothing inside (means empty).
now i would like to retrieve the userStatus which values are something inside and how should i retrieve? cos in the web form i've got a listbox showing all the status. now im including an ALL status to select all the status frm the db without having to select all the status individually from the listbox.
<%sql = "Select * from status ORDER BY statusType ASC"
set rsS = Conn.Execute(sql)
do while not rsS.eof
response.Write("<option value='"&rsS("statusID")&"'")
if request.QueryString("statusType") <> "" then
state = split(request.QueryString("statusType"),"|")
for each rec in state
if rsS("statusID") = Cint("0" & rec) then response.Write(" selected")
next
end if
response.Write(">"&rsS("statusType")&"</option>")
rsS.moveNext
loop
%>
</select>
if request.QueryString("statusType") <> "" then
sqlC = "select * from t_user_account where (userStatus='"&replace(request.QueryString("statusType"),"|","' or userStatus = '")&"')"
set rsC= conn.execute(sqlC)
end if
by the way, do anyone know how to explain such select sql statement:
select * from user_acc where userStatus like '%_%'
I understand that userStatus like '%%' is to retrieve evry single record frm the table.
and _ is to select a single character but it should be coded with like this: '_' then the userStatus = 5, 6 will be retrieved.
so how about userStatus like '%_%'?
thanks in advance!!