'查詢8月的相關數據的查詢語句
"select * from vip where vip_Birthday between #2007-8-1# and #2007-8-31#"
'查詢某個字段值存在時發出提示
vip_Name=Trim(Request.Form("vip_Name"))
Set rs = conn.Execute("select * from 表名 where vip_Name='"&vip_Name&"'")
If not (rs.EOF And rs.BOF) Then
Response.Write "<script language=javascript>alert('這個貴賓的資料已經存在');history.back();</script>"
End if
'查詢某一字段不為空的SQL語句,兩種方法都可以
select Vip,Tel,MobilePhone,BirthDay,Code from VIP where BirthDay <> ''
select Vip,Tel,MobilePhone,BirthDay,Code from VIP where BirthDay is not NULL