Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select AND/OR

Status
Not open for further replies.

Nickman

Programmer
Aug 23, 2001
14
0
0
CH
Hi

This is the script i have already:

Code:
House = ObjektID (get from other select)

sql_command = "SELECT * FROM tblKalender WHERE Datum=cDate(#" & Datum & "#) AND Status = 2 AND Objekt=" & House

I need to make following changes, an i'm a little stuck.

if Status = 1 then only show from Date in DB + 14 Days
if Status = 2 then show (like above)
if Status = 3 don't show
if Status = 4 then show (like above)
 
the SQL Case statement only works with SQL Server though (maybe Oracle, not sure)

from your conditions, it looks like the only one you need to check for is 3. (if 1,2 and 4 are the same, why check for them)

so instead of using the case statment, you could do something like

if status <> 3 then
.. do date processing code
end if

I'm a little confused though... did you need to update the table, or just change your ASP logic?

if you need to update the table, post back

hth
leo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top