Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - If Statements w/ Numbers
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

If Statements w/ Numbers

 Post Reply Post Reply
Author
k_mustard View Drop Down
Newbie
Newbie
Avatar

Joined: 09 October 2003
Location: Canada
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote k_mustard Quote  Post ReplyReply Direct Link To This Post Topic: If Statements w/ Numbers
    Posted: 15 October 2003 at 10:16am

Ok here is question 2, I want to display the records from between 400000-500000 also the records between 40000000-50000000. My reason for this is because all the records between these numbers are from the same work order and must have a different instance occur when called upon in a form.

<%IF strSQL("Unit_Status")="WFP" AND ((strSQL("Record")=400000>500000 OR strSQL("Record")=40000000>50000000))THEN%>

So this isnt exactly working...what should i use instead?? or change?

Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 15 October 2003 at 10:44am

"strSQL("Record")=400000>500000" 

is totally not valid that's why it don't work

you'll have to do like:

IF strSQL("Unit_Status")="WFP" AND ((strSQL("Record") >=400000 AND strSQL("Record")<=500000) OR (strSQL("Record")>=40000000 AND strSQL("Record")<=50000000))THEN

not sure where you are learning ASP syntax from, but find a new source! :-)

Contribute to the working anarchy we fondly call the Internet
Back to Top
k_mustard View Drop Down
Newbie
Newbie
Avatar

Joined: 09 October 2003
Location: Canada
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote k_mustard Quote  Post ReplyReply Direct Link To This Post Posted: 15 October 2003 at 10:51am

lol..yea ive just been trying trial and error....maybe i should learn before i try that

 

Back to Top
k_mustard View Drop Down
Newbie
Newbie
Avatar

Joined: 09 October 2003
Location: Canada
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote k_mustard Quote  Post ReplyReply Direct Link To This Post Posted: 15 October 2003 at 10:52am
btw..thanks for your help..that works great
Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 15 October 2003 at 10:59am

i forgot to mention:

are these records in the range of 400000 to 500000 (and the other range) the only ones you will be using?

because if so, it'd make a lot more sense to use those ranges as criteria in your SQL statement, then you don't need any if..then's in your ASP script

Contribute to the working anarchy we fondly call the Internet
Back to Top
k_mustard View Drop Down
Newbie
Newbie
Avatar

Joined: 09 October 2003
Location: Canada
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote k_mustard Quote  Post ReplyReply Direct Link To This Post Posted: 15 October 2003 at 11:01am
No...i need all the other records as well..so this will work fine
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.