Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: Re: SELECT CASE -- CASE


Message #1 by "Ken Sobieski" <kwsobieski@a...> on Tue, 15 May 2001 19:16:05
> Case ((x >= 900) AND (x <= 908)) OR ((x >= 910) AND (x <= 918)) OR ((x >

> 923) and (x <= 928)) OR (x = 930)

> 

> tom



Thanks, I'll give this a try.

Message #2 by "Ken Sobieski" <kwsobieski@a...> on Tue, 15 May 2001 19:28:33
No dice using 



Case ((x >= 900) AND (x <= 908)) OR ((x >= 910) AND (x <= 918)) OR ((x >= 

923) and (x <= 928)) OR (x = 930)



Also, I have too many options to use if statements.



Anyone else have an idea?



Thanks!
Message #3 by "TomMallard" <mallard@s...> on Tue, 15 May 2001 16:42:21 -0700
I didn't spend time on that...consider breaking it up into several cases

even though the actions may be identical...and of course if's can work



select case x



Case ((x >= 900) AND (x <= 908))



Case ((x >= 910) AND (x <= 918))



Case ((x >= 923) and (x <= 928))



Case (x = 930)



Or, if's can do the same...



if ((x >= 900) AND (x <= 908)) then

...

elseif ((x >= 910) AND (x <= 918)) then

...

elseif ((x >= 923) and (x <= 928)) then

...

elseif (x = 930) then

...

else

...

end if



By using elseif, you link the conditionals...



tom

> ----- Original Message -----

> From: "Ken Sobieski" <kwsobieski@a...>

> To: "ASP Web HowTo" <asp_web_howto@p...>

> Sent: Tuesday, May 15, 2001 7:28 PM

> Subject: [asp_web_howto] Re: SELECT CASE -- CASE

>

>

> > No dice using

> >

> > Case ((x >= 900) AND (x <= 908)) OR ((x >= 910) AND (x <= 918)) OR ((x

>

> > 923) and (x <= 928)) OR (x = 930)

> >

> > Also, I have too many options to use if statements.

> >

> > Anyone else have an idea?

> >

> > Thanks!

> > ---

> > SoftArtisans helps developers build robust, scalable Web applications!

> > Excel Web reports, charts: http://www.softartisans.com/excelwriter.html

> > File uploads: http://www.softartisans.com/saf.html

> > Transactional file management: http://www.softartisans.com/saf1.html

> > Scalability: http://www.softartisans.com/saxsession.html

> > ASPstudio value pack: http://www.softartisans.com/aspstudiosuite.html




> $subst('Email.Unsub')

> >

> >

>




  Return to Index